home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / comms / other / slrn / slrn_src / configure < prev    next >
Text File  |  1999-05-14  |  91KB  |  3,028 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-x                use the X Window System"
  16. ac_help="$ac_help
  17.   --enable-warnings       turn on GCC compiler warnings"
  18.  
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40. bindir='${exec_prefix}/bin'
  41. sbindir='${exec_prefix}/sbin'
  42. libexecdir='${exec_prefix}/libexec'
  43. datadir='${prefix}/share'
  44. sysconfdir='${prefix}/etc'
  45. sharedstatedir='${prefix}/com'
  46. localstatedir='${prefix}/var'
  47. libdir='${exec_prefix}/lib'
  48. includedir='${prefix}/include'
  49. oldincludedir='/usr/include'
  50. infodir='${prefix}/info'
  51. mandir='${prefix}/man'
  52.  
  53. # Initialize some other variables.
  54. subdirs=
  55. MFLAGS= MAKEFLAGS=
  56. # Maximum number of lines to put in a shell here document.
  57. ac_max_here_lines=12
  58.  
  59. ac_prev=
  60. for ac_option
  61. do
  62.  
  63.   # If the previous option needs an argument, assign it.
  64.   if test -n "$ac_prev"; then
  65.     eval "$ac_prev=\$ac_option"
  66.     ac_prev=
  67.     continue
  68.   fi
  69.  
  70.   case "$ac_option" in
  71.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  72.   *) ac_optarg= ;;
  73.   esac
  74.  
  75.   # Accept the important Cygnus configure options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.  
  79.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  80.     ac_prev=bindir ;;
  81.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  82.     bindir="$ac_optarg" ;;
  83.  
  84.   -build | --build | --buil | --bui | --bu)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  90.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  91.     ac_prev=cache_file ;;
  92.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  93.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  94.     cache_file="$ac_optarg" ;;
  95.  
  96.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  97.     ac_prev=datadir ;;
  98.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  99.   | --da=*)
  100.     datadir="$ac_optarg" ;;
  101.  
  102.   -disable-* | --disable-*)
  103.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  104.     # Reject names that are not valid shell variable names.
  105.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  106.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  107.     fi
  108.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  109.     eval "enable_${ac_feature}=no" ;;
  110.  
  111.   -enable-* | --enable-*)
  112.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  113.     # Reject names that are not valid shell variable names.
  114.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  115.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  116.     fi
  117.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  118.     case "$ac_option" in
  119.       *=*) ;;
  120.       *) ac_optarg=yes ;;
  121.     esac
  122.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  123.  
  124.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  125.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  126.   | --exec | --exe | --ex)
  127.     ac_prev=exec_prefix ;;
  128.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  129.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  130.   | --exec=* | --exe=* | --ex=*)
  131.     exec_prefix="$ac_optarg" ;;
  132.  
  133.   -gas | --gas | --ga | --g)
  134.     # Obsolete; use --with-gas.
  135.     with_gas=yes ;;
  136.  
  137.   -help | --help | --hel | --he)
  138.     # Omit some internal or obsolete options to make the list less imposing.
  139.     # This message is too long to be a string in the A/UX 3.1 sh.
  140.     cat << EOF
  141. Usage: configure [options] [host]
  142. Options: [defaults in brackets after descriptions]
  143. Configuration:
  144.   --cache-file=FILE       cache test results in FILE
  145.   --help                  print this message
  146.   --no-create             do not create output files
  147.   --quiet, --silent       do not print \`checking...' messages
  148.   --version               print the version of autoconf that created configure
  149. Directory and file names:
  150.   --prefix=PREFIX         install architecture-independent files in PREFIX
  151.                           [$ac_default_prefix]
  152.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  153.                           [same as prefix]
  154.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  155.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  156.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  157.   --datadir=DIR           read-only architecture-independent data in DIR
  158.                           [PREFIX/share]
  159.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  160.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  161.                           [PREFIX/com]
  162.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  163.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  164.   --includedir=DIR        C header files in DIR [PREFIX/include]
  165.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  166.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  167.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  168.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  169.   --program-prefix=PREFIX prepend PREFIX to installed program names
  170.   --program-suffix=SUFFIX append SUFFIX to installed program names
  171.   --program-transform-name=PROGRAM
  172.                           run sed PROGRAM on installed program names
  173. EOF
  174.     cat << EOF
  175. Host type:
  176.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  177.   --host=HOST             configure for HOST [guessed]
  178.   --target=TARGET         configure for TARGET [TARGET=HOST]
  179. Features and packages:
  180.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  181.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  182.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  183.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  184.   --x-includes=DIR        X include files are in DIR
  185.   --x-libraries=DIR       X library files are in DIR
  186. EOF
  187.     if test -n "$ac_help"; then
  188.       echo "--enable and --with options recognized:$ac_help"
  189.     fi
  190.     exit 0 ;;
  191.  
  192.   -host | --host | --hos | --ho)
  193.     ac_prev=host ;;
  194.   -host=* | --host=* | --hos=* | --ho=*)
  195.     host="$ac_optarg" ;;
  196.  
  197.   -includedir | --includedir | --includedi | --included | --include \
  198.   | --includ | --inclu | --incl | --inc)
  199.     ac_prev=includedir ;;
  200.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  201.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  202.     includedir="$ac_optarg" ;;
  203.  
  204.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  205.     ac_prev=infodir ;;
  206.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  207.     infodir="$ac_optarg" ;;
  208.  
  209.   -libdir | --libdir | --libdi | --libd)
  210.     ac_prev=libdir ;;
  211.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  212.     libdir="$ac_optarg" ;;
  213.  
  214.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  215.   | --libexe | --libex | --libe)
  216.     ac_prev=libexecdir ;;
  217.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  218.   | --libexe=* | --libex=* | --libe=*)
  219.     libexecdir="$ac_optarg" ;;
  220.  
  221.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  222.   | --localstate | --localstat | --localsta | --localst \
  223.   | --locals | --local | --loca | --loc | --lo)
  224.     ac_prev=localstatedir ;;
  225.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  226.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  227.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  228.     localstatedir="$ac_optarg" ;;
  229.  
  230.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  231.     ac_prev=mandir ;;
  232.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  233.     mandir="$ac_optarg" ;;
  234.  
  235.   -nfp | --nfp | --nf)
  236.     # Obsolete; use --without-fp.
  237.     with_fp=no ;;
  238.  
  239.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  240.   | --no-cr | --no-c)
  241.     no_create=yes ;;
  242.  
  243.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  244.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  245.     no_recursion=yes ;;
  246.  
  247.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  248.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  249.   | --oldin | --oldi | --old | --ol | --o)
  250.     ac_prev=oldincludedir ;;
  251.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  252.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  253.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  254.     oldincludedir="$ac_optarg" ;;
  255.  
  256.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  257.     ac_prev=prefix ;;
  258.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  259.     prefix="$ac_optarg" ;;
  260.  
  261.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  262.   | --program-pre | --program-pr | --program-p)
  263.     ac_prev=program_prefix ;;
  264.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  265.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  266.     program_prefix="$ac_optarg" ;;
  267.  
  268.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  269.   | --program-suf | --program-su | --program-s)
  270.     ac_prev=program_suffix ;;
  271.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  272.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  273.     program_suffix="$ac_optarg" ;;
  274.  
  275.   -program-transform-name | --program-transform-name \
  276.   | --program-transform-nam | --program-transform-na \
  277.   | --program-transform-n | --program-transform- \
  278.   | --program-transform | --program-transfor \
  279.   | --program-transfo | --program-transf \
  280.   | --program-trans | --program-tran \
  281.   | --progr-tra | --program-tr | --program-t)
  282.     ac_prev=program_transform_name ;;
  283.   -program-transform-name=* | --program-transform-name=* \
  284.   | --program-transform-nam=* | --program-transform-na=* \
  285.   | --program-transform-n=* | --program-transform-=* \
  286.   | --program-transform=* | --program-transfor=* \
  287.   | --program-transfo=* | --program-transf=* \
  288.   | --program-trans=* | --program-tran=* \
  289.   | --progr-tra=* | --program-tr=* | --program-t=*)
  290.     program_transform_name="$ac_optarg" ;;
  291.  
  292.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  293.   | -silent | --silent | --silen | --sile | --sil)
  294.     silent=yes ;;
  295.  
  296.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  297.     ac_prev=sbindir ;;
  298.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  299.   | --sbi=* | --sb=*)
  300.     sbindir="$ac_optarg" ;;
  301.  
  302.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  303.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  304.   | --sharedst | --shareds | --shared | --share | --shar \
  305.   | --sha | --sh)
  306.     ac_prev=sharedstatedir ;;
  307.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  308.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  309.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  310.   | --sha=* | --sh=*)
  311.     sharedstatedir="$ac_optarg" ;;
  312.  
  313.   -site | --site | --sit)
  314.     ac_prev=site ;;
  315.   -site=* | --site=* | --sit=*)
  316.     site="$ac_optarg" ;;
  317.  
  318.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  319.     ac_prev=srcdir ;;
  320.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  321.     srcdir="$ac_optarg" ;;
  322.  
  323.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  324.   | --syscon | --sysco | --sysc | --sys | --sy)
  325.     ac_prev=sysconfdir ;;
  326.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  327.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  328.     sysconfdir="$ac_optarg" ;;
  329.  
  330.   -target | --target | --targe | --targ | --tar | --ta | --t)
  331.     ac_prev=target ;;
  332.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  333.     target="$ac_optarg" ;;
  334.  
  335.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  336.     verbose=yes ;;
  337.  
  338.   -version | --version | --versio | --versi | --vers)
  339.     echo "configure generated by autoconf version 2.12"
  340.     exit 0 ;;
  341.  
  342.   -with-* | --with-*)
  343.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  344.     # Reject names that are not valid shell variable names.
  345.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  346.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  347.     fi
  348.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  349.     case "$ac_option" in
  350.       *=*) ;;
  351.       *) ac_optarg=yes ;;
  352.     esac
  353.     eval "with_${ac_package}='$ac_optarg'" ;;
  354.  
  355.   -without-* | --without-*)
  356.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  357.     # Reject names that are not valid shell variable names.
  358.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  359.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  360.     fi
  361.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  362.     eval "with_${ac_package}=no" ;;
  363.  
  364.   --x)
  365.     # Obsolete; use --with-x.
  366.     with_x=yes ;;
  367.  
  368.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  369.   | --x-incl | --x-inc | --x-in | --x-i)
  370.     ac_prev=x_includes ;;
  371.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  372.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  373.     x_includes="$ac_optarg" ;;
  374.  
  375.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  376.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  377.     ac_prev=x_libraries ;;
  378.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  379.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  380.     x_libraries="$ac_optarg" ;;
  381.  
  382.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  383.     ;;
  384.  
  385.   *)
  386.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  387.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  388.     fi
  389.     if test "x$nonopt" != xNONE; then
  390.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  391.     fi
  392.     nonopt="$ac_option"
  393.     ;;
  394.  
  395.   esac
  396. done
  397.  
  398. if test -n "$ac_prev"; then
  399.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  400. fi
  401.  
  402. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  403.  
  404. # File descriptor usage:
  405. # 0 standard input
  406. # 1 file creation
  407. # 2 errors and warnings
  408. # 3 some systems may open it to /dev/tty
  409. # 4 used on the Kubota Titan
  410. # 6 checking for... messages and results
  411. # 5 compiler messages saved in config.log
  412. if test "$silent" = yes; then
  413.   exec 6>/dev/null
  414. else
  415.   exec 6>&1
  416. fi
  417. exec 5>./config.log
  418.  
  419. echo "\
  420. This file contains any messages produced by compilers while
  421. running configure, to aid debugging if configure makes a mistake.
  422. " 1>&5
  423.  
  424. # Strip out --no-create and --no-recursion so they do not pile up.
  425. # Also quote any args containing shell metacharacters.
  426. ac_configure_args=
  427. for ac_arg
  428. do
  429.   case "$ac_arg" in
  430.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  431.   | --no-cr | --no-c) ;;
  432.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  433.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  434.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  435.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  436.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  437.   esac
  438. done
  439.  
  440. # NLS nuisances.
  441. # Only set these to C if already set.  These must not be set unconditionally
  442. # because not all systems understand e.g. LANG=C (notably SCO).
  443. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  444. # Non-C LC_CTYPE values break the ctype check.
  445. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  446. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  447. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  448. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  449.  
  450. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  451. rm -rf conftest* confdefs.h
  452. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  453. echo > confdefs.h
  454.  
  455. # A filename unique to this package, relative to the directory that
  456. # configure is in, which we can look for to find out if srcdir is correct.
  457. ac_unique_file=src/slrn.c
  458.  
  459. # Find the source files, if location was not specified.
  460. if test -z "$srcdir"; then
  461.   ac_srcdir_defaulted=yes
  462.   # Try the directory containing this script, then its parent.
  463.   ac_prog=$0
  464.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  465.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  466.   srcdir=$ac_confdir
  467.   if test ! -r $srcdir/$ac_unique_file; then
  468.     srcdir=..
  469.   fi
  470. else
  471.   ac_srcdir_defaulted=no
  472. fi
  473. if test ! -r $srcdir/$ac_unique_file; then
  474.   if test "$ac_srcdir_defaulted" = yes; then
  475.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  476.   else
  477.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  478.   fi
  479. fi
  480. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  481.  
  482. # Prefer explicitly selected file to automatically selected ones.
  483. if test -z "$CONFIG_SITE"; then
  484.   if test "x$prefix" != xNONE; then
  485.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  486.   else
  487.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  488.   fi
  489. fi
  490. for ac_site_file in $CONFIG_SITE; do
  491.   if test -r "$ac_site_file"; then
  492.     echo "loading site script $ac_site_file"
  493.     . "$ac_site_file"
  494.   fi
  495. done
  496.  
  497. if test -r "$cache_file"; then
  498.   echo "loading cache $cache_file"
  499.   . $cache_file
  500. else
  501.   echo "creating cache $cache_file"
  502.   > $cache_file
  503. fi
  504.  
  505. ac_ext=c
  506. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  507. ac_cpp='$CPP $CPPFLAGS'
  508. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  509. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  510. cross_compiling=$ac_cv_prog_cc_cross
  511.  
  512. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  513.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  514.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  515.     ac_n= ac_c='
  516. ' ac_t='    '
  517.   else
  518.     ac_n=-n ac_c= ac_t=
  519.   fi
  520. else
  521.   ac_n= ac_c='\c' ac_t=
  522. fi
  523.  
  524.  
  525.  
  526. #These variable are initialized by JD init function
  527. CONFIG_DIR=`pwd`
  528. cd $srcdir
  529. if test "`pwd`" != "$CONFIG_DIR"
  530.   then 
  531.   { echo "configure: error: "This software does not support configuring from another directory.   See the INSTALL file"" 1>&2; exit 1; }
  532.   fi
  533. # Note: these will differ if one is a symbolic link
  534. if test -f /usr/bin/dirname; then
  535.   JD_Above_Dir=`dirname $CONFIG_DIR`
  536. else
  537. # system is a loser
  538.   JD_Above_Dir=`cd ..;pwd`
  539. fi
  540. JD_Above_Dir2=`cd ..;pwd`
  541.  
  542.  
  543. # Extract the first word of "gcc", so it can be a program name with args.
  544. set dummy gcc; ac_word=$2
  545. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  546. echo "configure:547: checking for $ac_word" >&5
  547. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  548.   echo $ac_n "(cached) $ac_c" 1>&6
  549. else
  550.   if test -n "$CC"; then
  551.   ac_cv_prog_CC="$CC" # Let the user override the test.
  552. else
  553.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  554.   for ac_dir in $PATH; do
  555.     test -z "$ac_dir" && ac_dir=.
  556.     if test -f $ac_dir/$ac_word; then
  557.       ac_cv_prog_CC="gcc"
  558.       break
  559.     fi
  560.   done
  561.   IFS="$ac_save_ifs"
  562. fi
  563. fi
  564. CC="$ac_cv_prog_CC"
  565. if test -n "$CC"; then
  566.   echo "$ac_t""$CC" 1>&6
  567. else
  568.   echo "$ac_t""no" 1>&6
  569. fi
  570.  
  571. if test -z "$CC"; then
  572.   # Extract the first word of "cc", so it can be a program name with args.
  573. set dummy cc; ac_word=$2
  574. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  575. echo "configure:576: checking for $ac_word" >&5
  576. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  577.   echo $ac_n "(cached) $ac_c" 1>&6
  578. else
  579.   if test -n "$CC"; then
  580.   ac_cv_prog_CC="$CC" # Let the user override the test.
  581. else
  582.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  583.   ac_prog_rejected=no
  584.   for ac_dir in $PATH; do
  585.     test -z "$ac_dir" && ac_dir=.
  586.     if test -f $ac_dir/$ac_word; then
  587.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  588.         ac_prog_rejected=yes
  589.     continue
  590.       fi
  591.       ac_cv_prog_CC="cc"
  592.       break
  593.     fi
  594.   done
  595.   IFS="$ac_save_ifs"
  596. if test $ac_prog_rejected = yes; then
  597.   # We found a bogon in the path, so make sure we never use it.
  598.   set dummy $ac_cv_prog_CC
  599.   shift
  600.   if test $# -gt 0; then
  601.     # We chose a different compiler from the bogus one.
  602.     # However, it has the same basename, so the bogon will be chosen
  603.     # first if we set CC to just the basename; use the full file name.
  604.     shift
  605.     set dummy "$ac_dir/$ac_word" "$@"
  606.     shift
  607.     ac_cv_prog_CC="$@"
  608.   fi
  609. fi
  610. fi
  611. fi
  612. CC="$ac_cv_prog_CC"
  613. if test -n "$CC"; then
  614.   echo "$ac_t""$CC" 1>&6
  615. else
  616.   echo "$ac_t""no" 1>&6
  617. fi
  618.  
  619.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  620. fi
  621.  
  622. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  623. echo "configure:624: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  624.  
  625. ac_ext=c
  626. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  627. ac_cpp='$CPP $CPPFLAGS'
  628. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  629. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  630. cross_compiling=$ac_cv_prog_cc_cross
  631.  
  632. cat > conftest.$ac_ext <<EOF
  633. #line 634 "configure"
  634. #include "confdefs.h"
  635. main(){return(0);}
  636. EOF
  637. if { (eval echo configure:638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  638.   ac_cv_prog_cc_works=yes
  639.   # If we can't run a trivial program, we are probably using a cross compiler.
  640.   if (./conftest; exit) 2>/dev/null; then
  641.     ac_cv_prog_cc_cross=no
  642.   else
  643.     ac_cv_prog_cc_cross=yes
  644.   fi
  645. else
  646.   echo "configure: failed program was:" >&5
  647.   cat conftest.$ac_ext >&5
  648.   ac_cv_prog_cc_works=no
  649. fi
  650. rm -fr conftest*
  651.  
  652. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  653. if test $ac_cv_prog_cc_works = no; then
  654.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  655. fi
  656. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  657. echo "configure:658: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  658. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  659. cross_compiling=$ac_cv_prog_cc_cross
  660.  
  661. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  662. echo "configure:663: checking whether we are using GNU C" >&5
  663. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  664.   echo $ac_n "(cached) $ac_c" 1>&6
  665. else
  666.   cat > conftest.c <<EOF
  667. #ifdef __GNUC__
  668.   yes;
  669. #endif
  670. EOF
  671. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  672.   ac_cv_prog_gcc=yes
  673. else
  674.   ac_cv_prog_gcc=no
  675. fi
  676. fi
  677.  
  678. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  679.  
  680. if test $ac_cv_prog_gcc = yes; then
  681.   GCC=yes
  682.   ac_test_CFLAGS="${CFLAGS+set}"
  683.   ac_save_CFLAGS="$CFLAGS"
  684.   CFLAGS=
  685.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  686. echo "configure:687: checking whether ${CC-cc} accepts -g" >&5
  687. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  688.   echo $ac_n "(cached) $ac_c" 1>&6
  689. else
  690.   echo 'void f(){}' > conftest.c
  691. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  692.   ac_cv_prog_cc_g=yes
  693. else
  694.   ac_cv_prog_cc_g=no
  695. fi
  696. rm -f conftest*
  697.  
  698. fi
  699.  
  700. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  701.   if test "$ac_test_CFLAGS" = set; then
  702.     CFLAGS="$ac_save_CFLAGS"
  703.   elif test $ac_cv_prog_cc_g = yes; then
  704.     CFLAGS="-g -O2"
  705.   else
  706.     CFLAGS="-O2"
  707.   fi
  708. else
  709.   GCC=
  710.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  711. fi
  712.  
  713. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  714. echo "configure:715: checking how to run the C preprocessor" >&5
  715. # On Suns, sometimes $CPP names a directory.
  716. if test -n "$CPP" && test -d "$CPP"; then
  717.   CPP=
  718. fi
  719. if test -z "$CPP"; then
  720. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  721.   echo $ac_n "(cached) $ac_c" 1>&6
  722. else
  723.     # This must be in double quotes, not single quotes, because CPP may get
  724.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  725.   CPP="${CC-cc} -E"
  726.   # On the NeXT, cc -E runs the code through the compiler's parser,
  727.   # not just through cpp.
  728.   cat > conftest.$ac_ext <<EOF
  729. #line 730 "configure"
  730. #include "confdefs.h"
  731. #include <assert.h>
  732. Syntax Error
  733. EOF
  734. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  735. { (eval echo configure:736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  736. ac_err=`grep -v '^ *+' conftest.out`
  737. if test -z "$ac_err"; then
  738.   :
  739. else
  740.   echo "$ac_err" >&5
  741.   echo "configure: failed program was:" >&5
  742.   cat conftest.$ac_ext >&5
  743.   rm -rf conftest*
  744.   CPP="${CC-cc} -E -traditional-cpp"
  745.   cat > conftest.$ac_ext <<EOF
  746. #line 747 "configure"
  747. #include "confdefs.h"
  748. #include <assert.h>
  749. Syntax Error
  750. EOF
  751. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  752. { (eval echo configure:753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  753. ac_err=`grep -v '^ *+' conftest.out`
  754. if test -z "$ac_err"; then
  755.   :
  756. else
  757.   echo "$ac_err" >&5
  758.   echo "configure: failed program was:" >&5
  759.   cat conftest.$ac_ext >&5
  760.   rm -rf conftest*
  761.   CPP=/lib/cpp
  762. fi
  763. rm -f conftest*
  764. fi
  765. rm -f conftest*
  766.   ac_cv_prog_CPP="$CPP"
  767. fi
  768.   CPP="$ac_cv_prog_CPP"
  769. else
  770.   ac_cv_prog_CPP="$CPP"
  771. fi
  772. echo "$ac_t""$CPP" 1>&6
  773.  
  774. if test $ac_cv_prog_gcc = yes; then
  775.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  776. echo "configure:777: checking whether ${CC-cc} needs -traditional" >&5
  777. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  778.   echo $ac_n "(cached) $ac_c" 1>&6
  779. else
  780.     ac_pattern="Autoconf.*'x'"
  781.   cat > conftest.$ac_ext <<EOF
  782. #line 783 "configure"
  783. #include "confdefs.h"
  784. #include <sgtty.h>
  785. Autoconf TIOCGETP
  786. EOF
  787. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  788.   egrep "$ac_pattern" >/dev/null 2>&1; then
  789.   rm -rf conftest*
  790.   ac_cv_prog_gcc_traditional=yes
  791. else
  792.   rm -rf conftest*
  793.   ac_cv_prog_gcc_traditional=no
  794. fi
  795. rm -f conftest*
  796.  
  797.  
  798.   if test $ac_cv_prog_gcc_traditional = no; then
  799.     cat > conftest.$ac_ext <<EOF
  800. #line 801 "configure"
  801. #include "confdefs.h"
  802. #include <termio.h>
  803. Autoconf TCGETA
  804. EOF
  805. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  806.   egrep "$ac_pattern" >/dev/null 2>&1; then
  807.   rm -rf conftest*
  808.   ac_cv_prog_gcc_traditional=yes
  809. fi
  810. rm -f conftest*
  811.  
  812.   fi
  813. fi
  814.  
  815. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  816.   if test $ac_cv_prog_gcc_traditional = yes; then
  817.     CC="$CC -traditional"
  818.   fi
  819. fi
  820.  
  821. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  822. echo "configure:823: checking for POSIXized ISC" >&5
  823. if test -d /etc/conf/kconfig.d &&
  824.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  825. then
  826.   echo "$ac_t""yes" 1>&6
  827.   ISC=yes # If later tests want to check for ISC.
  828.   cat >> confdefs.h <<\EOF
  829. #define _POSIX_SOURCE 1
  830. EOF
  831.  
  832.   if test "$GCC" = yes; then
  833.     CC="$CC -posix"
  834.   else
  835.     CC="$CC -Xp"
  836.   fi
  837. else
  838.   echo "$ac_t""no" 1>&6
  839.   ISC=
  840. fi
  841.  
  842. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  843. echo "configure:844: checking for AIX" >&5
  844. cat > conftest.$ac_ext <<EOF
  845. #line 846 "configure"
  846. #include "confdefs.h"
  847. #ifdef _AIX
  848.   yes
  849. #endif
  850.  
  851. EOF
  852. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  853.   egrep "yes" >/dev/null 2>&1; then
  854.   rm -rf conftest*
  855.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  856. #define _ALL_SOURCE 1
  857. EOF
  858.  
  859. else
  860.   rm -rf conftest*
  861.   echo "$ac_t""no" 1>&6
  862. fi
  863. rm -f conftest*
  864.  
  865.  
  866.  
  867. cat > conftest.$ac_ext <<EOF
  868. #line 869 "configure"
  869. #include "confdefs.h"
  870. #ifdef hpux
  871.   yes
  872. #endif
  873.  
  874. EOF
  875. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  876.   egrep "yes" >/dev/null 2>&1; then
  877.   rm -rf conftest*
  878.   
  879. cat >> confdefs.h <<\EOF
  880. #define _HPUX_SOURCE 1
  881. EOF
  882.  
  883. if test "$CC" = cc; then CC="cc -Ae"; fi
  884.  
  885. fi
  886. rm -f conftest*
  887. echo $ac_n "checking C compiler that understands ANSI prototypes""... $ac_c" 1>&6
  888. echo "configure:889: checking C compiler that understands ANSI prototypes" >&5
  889. cat > conftest.$ac_ext <<EOF
  890. #line 891 "configure"
  891. #include "confdefs.h"
  892.  
  893. int main() {
  894.  
  895.  extern int silly (int);
  896. ; return 0; }
  897. EOF
  898. if { (eval echo configure:899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  899.   rm -rf conftest*
  900.   
  901.  echo "$ac_t""$CC looks ok.  Good." 1>&6
  902. else
  903.   echo "configure: failed program was:" >&5
  904.   cat conftest.$ac_ext >&5
  905.   rm -rf conftest*
  906.   
  907.  echo "$ac_t""$CC is not a good enough compiler" 1>&6
  908.  { echo "configure: error: Set env variable CC to your ANSI compiler and rerun configure." 1>&2; exit 1; }
  909.  
  910. fi
  911. rm -f conftest*
  912.  
  913. ac_aux_dir=
  914. for ac_dir in autoconf $srcdir/autoconf; do
  915.   if test -f $ac_dir/install-sh; then
  916.     ac_aux_dir=$ac_dir
  917.     ac_install_sh="$ac_aux_dir/install-sh -c"
  918.     break
  919.   elif test -f $ac_dir/install.sh; then
  920.     ac_aux_dir=$ac_dir
  921.     ac_install_sh="$ac_aux_dir/install.sh -c"
  922.     break
  923.   fi
  924. done
  925. if test -z "$ac_aux_dir"; then
  926.   { echo "configure: error: can not find install-sh or install.sh in autoconf $srcdir/autoconf" 1>&2; exit 1; }
  927. fi
  928. ac_config_guess=$ac_aux_dir/config.guess
  929. ac_config_sub=$ac_aux_dir/config.sub
  930. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  931.  
  932. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  933. echo "configure:934: checking whether ${MAKE-make} sets \${MAKE}" >&5
  934. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  935. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  936.   echo $ac_n "(cached) $ac_c" 1>&6
  937. else
  938.   cat > conftestmake <<\EOF
  939. all:
  940.     @echo 'ac_maketemp="${MAKE}"'
  941. EOF
  942. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  943. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  944. if test -n "$ac_maketemp"; then
  945.   eval ac_cv_prog_make_${ac_make}_set=yes
  946. else
  947.   eval ac_cv_prog_make_${ac_make}_set=no
  948. fi
  949. rm -f conftestmake
  950. fi
  951. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  952.   echo "$ac_t""yes" 1>&6
  953.   SET_MAKE=
  954. else
  955.   echo "$ac_t""no" 1>&6
  956.   SET_MAKE="MAKE=${MAKE-make}"
  957. fi
  958.  
  959. # Find a good install program.  We prefer a C program (faster),
  960. # so one script is as good as another.  But avoid the broken or
  961. # incompatible versions:
  962. # SysV /etc/install, /usr/sbin/install
  963. # SunOS /usr/etc/install
  964. # IRIX /sbin/install
  965. # AIX /bin/install
  966. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  967. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  968. # ./install, which can be erroneously created by make from ./install.sh.
  969. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  970. echo "configure:971: checking for a BSD compatible install" >&5
  971. if test -z "$INSTALL"; then
  972. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  973.   echo $ac_n "(cached) $ac_c" 1>&6
  974. else
  975.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  976.   for ac_dir in $PATH; do
  977.     # Account for people who put trailing slashes in PATH elements.
  978.     case "$ac_dir/" in
  979.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  980.     *)
  981.       # OSF1 and SCO ODT 3.0 have their own names for install.
  982.       for ac_prog in ginstall installbsd scoinst install; do
  983.         if test -f $ac_dir/$ac_prog; then
  984.       if test $ac_prog = install &&
  985.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  986.         # AIX install.  It has an incompatible calling convention.
  987.         # OSF/1 installbsd also uses dspmsg, but is usable.
  988.         :
  989.       else
  990.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  991.         break 2
  992.       fi
  993.     fi
  994.       done
  995.       ;;
  996.     esac
  997.   done
  998.   IFS="$ac_save_IFS"
  999.  
  1000. fi
  1001.   if test "${ac_cv_path_install+set}" = set; then
  1002.     INSTALL="$ac_cv_path_install"
  1003.   else
  1004.     # As a last resort, use the slow shell script.  We don't cache a
  1005.     # path for INSTALL within a source directory, because that will
  1006.     # break other packages using the cache if that directory is
  1007.     # removed, or if the path is relative.
  1008.     INSTALL="$ac_install_sh"
  1009.   fi
  1010. fi
  1011. echo "$ac_t""$INSTALL" 1>&6
  1012.  
  1013. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1014. # It thinks the first close brace ends the variable substitution.
  1015. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1016.  
  1017. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1018.  
  1019.  
  1020. # determine X include and needed libs
  1021. # If we find X, set shell vars x_includes and x_libraries to the
  1022. # paths, otherwise set no_x=yes.
  1023. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1024. # --without-x overrides everything else, but does not touch the cache.
  1025. echo $ac_n "checking for X""... $ac_c" 1>&6
  1026. echo "configure:1027: checking for X" >&5
  1027.  
  1028. # Check whether --with-x or --without-x was given.
  1029. if test "${with_x+set}" = set; then
  1030.   withval="$with_x"
  1031.   :
  1032. fi
  1033.  
  1034. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1035. if test "x$with_x" = xno; then
  1036.   # The user explicitly disabled X.
  1037.   have_x=disabled
  1038. else
  1039.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1040.     # Both variables are already set.
  1041.     have_x=yes
  1042.   else
  1043. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1044.   echo $ac_n "(cached) $ac_c" 1>&6
  1045. else
  1046.   # One or both of the vars are not set, and there is no cached value.
  1047. ac_x_includes=NO ac_x_libraries=NO
  1048. rm -fr conftestdir
  1049. if mkdir conftestdir; then
  1050.   cd conftestdir
  1051.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1052.   cat > Imakefile <<'EOF'
  1053. acfindx:
  1054.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1055. EOF
  1056.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1057.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1058.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1059.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1060.     for ac_extension in a so sl; do
  1061.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1062.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1063.         ac_im_usrlibdir=$ac_im_libdir; break
  1064.       fi
  1065.     done
  1066.     # Screen out bogus values from the imake configuration.  They are
  1067.     # bogus both because they are the default anyway, and because
  1068.     # using them would break gcc on systems where it needs fixed includes.
  1069.     case "$ac_im_incroot" in
  1070.     /usr/include) ;;
  1071.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1072.     esac
  1073.     case "$ac_im_usrlibdir" in
  1074.     /usr/lib | /lib) ;;
  1075.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1076.     esac
  1077.   fi
  1078.   cd ..
  1079.   rm -fr conftestdir
  1080. fi
  1081.  
  1082. if test "$ac_x_includes" = NO; then
  1083.   # Guess where to find include files, by looking for this one X11 .h file.
  1084.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1085.  
  1086.   # First, try using that file with no special directory specified.
  1087. cat > conftest.$ac_ext <<EOF
  1088. #line 1089 "configure"
  1089. #include "confdefs.h"
  1090. #include <$x_direct_test_include>
  1091. EOF
  1092. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1093. { (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1094. ac_err=`grep -v '^ *+' conftest.out`
  1095. if test -z "$ac_err"; then
  1096.   rm -rf conftest*
  1097.   # We can compile using X headers with no special include directory.
  1098. ac_x_includes=
  1099. else
  1100.   echo "$ac_err" >&5
  1101.   echo "configure: failed program was:" >&5
  1102.   cat conftest.$ac_ext >&5
  1103.   rm -rf conftest*
  1104.   # Look for the header file in a standard set of common directories.
  1105. # Check X11 before X11Rn because it is often a symlink to the current release.
  1106.   for ac_dir in               \
  1107.     /usr/X11/include          \
  1108.     /usr/X11R6/include        \
  1109.     /usr/X11R5/include        \
  1110.     /usr/X11R4/include        \
  1111.                               \
  1112.     /usr/include/X11          \
  1113.     /usr/include/X11R6        \
  1114.     /usr/include/X11R5        \
  1115.     /usr/include/X11R4        \
  1116.                               \
  1117.     /usr/local/X11/include    \
  1118.     /usr/local/X11R6/include  \
  1119.     /usr/local/X11R5/include  \
  1120.     /usr/local/X11R4/include  \
  1121.                               \
  1122.     /usr/local/include/X11    \
  1123.     /usr/local/include/X11R6  \
  1124.     /usr/local/include/X11R5  \
  1125.     /usr/local/include/X11R4  \
  1126.                               \
  1127.     /usr/X386/include         \
  1128.     /usr/x386/include         \
  1129.     /usr/XFree86/include/X11  \
  1130.                               \
  1131.     /usr/include              \
  1132.     /usr/local/include        \
  1133.     /usr/unsupported/include  \
  1134.     /usr/athena/include       \
  1135.     /usr/local/x11r5/include  \
  1136.     /usr/lpp/Xamples/include  \
  1137.                               \
  1138.     /usr/openwin/include      \
  1139.     /usr/openwin/share/include \
  1140.     ; \
  1141.   do
  1142.     if test -r "$ac_dir/$x_direct_test_include"; then
  1143.       ac_x_includes=$ac_dir
  1144.       break
  1145.     fi
  1146.   done
  1147. fi
  1148. rm -f conftest*
  1149. fi # $ac_x_includes = NO
  1150.  
  1151. if test "$ac_x_libraries" = NO; then
  1152.   # Check for the libraries.
  1153.  
  1154.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1155.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1156.  
  1157.   # See if we find them without any special options.
  1158.   # Don't add to $LIBS permanently.
  1159.   ac_save_LIBS="$LIBS"
  1160.   LIBS="-l$x_direct_test_library $LIBS"
  1161. cat > conftest.$ac_ext <<EOF
  1162. #line 1163 "configure"
  1163. #include "confdefs.h"
  1164.  
  1165. int main() {
  1166. ${x_direct_test_function}()
  1167. ; return 0; }
  1168. EOF
  1169. if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1170.   rm -rf conftest*
  1171.   LIBS="$ac_save_LIBS"
  1172. # We can link X programs with no special library path.
  1173. ac_x_libraries=
  1174. else
  1175.   echo "configure: failed program was:" >&5
  1176.   cat conftest.$ac_ext >&5
  1177.   rm -rf conftest*
  1178.   LIBS="$ac_save_LIBS"
  1179. # First see if replacing the include by lib works.
  1180. # Check X11 before X11Rn because it is often a symlink to the current release.
  1181. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1182.     /usr/X11/lib          \
  1183.     /usr/X11R6/lib        \
  1184.     /usr/X11R5/lib        \
  1185.     /usr/X11R4/lib        \
  1186.                           \
  1187.     /usr/lib/X11          \
  1188.     /usr/lib/X11R6        \
  1189.     /usr/lib/X11R5        \
  1190.     /usr/lib/X11R4        \
  1191.                           \
  1192.     /usr/local/X11/lib    \
  1193.     /usr/local/X11R6/lib  \
  1194.     /usr/local/X11R5/lib  \
  1195.     /usr/local/X11R4/lib  \
  1196.                           \
  1197.     /usr/local/lib/X11    \
  1198.     /usr/local/lib/X11R6  \
  1199.     /usr/local/lib/X11R5  \
  1200.     /usr/local/lib/X11R4  \
  1201.                           \
  1202.     /usr/X386/lib         \
  1203.     /usr/x386/lib         \
  1204.     /usr/XFree86/lib/X11  \
  1205.                           \
  1206.     /usr/lib              \
  1207.     /usr/local/lib        \
  1208.     /usr/unsupported/lib  \
  1209.     /usr/athena/lib       \
  1210.     /usr/local/x11r5/lib  \
  1211.     /usr/lpp/Xamples/lib  \
  1212.     /lib/usr/lib/X11      \
  1213.                           \
  1214.     /usr/openwin/lib      \
  1215.     /usr/openwin/share/lib \
  1216.     ; \
  1217. do
  1218.   for ac_extension in a so sl; do
  1219.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1220.       ac_x_libraries=$ac_dir
  1221.       break 2
  1222.     fi
  1223.   done
  1224. done
  1225. fi
  1226. rm -f conftest*
  1227. fi # $ac_x_libraries = NO
  1228.  
  1229. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1230.   # Didn't find X anywhere.  Cache the known absence of X.
  1231.   ac_cv_have_x="have_x=no"
  1232. else
  1233.   # Record where we found X for the cache.
  1234.   ac_cv_have_x="have_x=yes \
  1235.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1236. fi
  1237. fi
  1238.   fi
  1239.   eval "$ac_cv_have_x"
  1240. fi # $with_x != no
  1241.  
  1242. if test "$have_x" != yes; then
  1243.   echo "$ac_t""$have_x" 1>&6
  1244.   no_x=yes
  1245. else
  1246.   # If each of the values was on the command line, it overrides each guess.
  1247.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1248.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1249.   # Update the cache value to reflect the command line values.
  1250.   ac_cv_have_x="have_x=yes \
  1251.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1252.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1253. fi
  1254.  
  1255. if test "$no_x" = yes; then
  1256.   # Not all programs may use this symbol, but it does not hurt to define it.
  1257.   cat >> confdefs.h <<\EOF
  1258. #define X_DISPLAY_MISSING 1
  1259. EOF
  1260.  
  1261.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  1262. else
  1263.   if test -n "$x_includes"; then
  1264.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  1265.   fi
  1266.  
  1267.   # It would also be nice to do this for all -L options, not just this one.
  1268.   if test -n "$x_libraries"; then
  1269.     X_LIBS="$X_LIBS -L$x_libraries"
  1270.     # For Solaris; some versions of Sun CC require a space after -R and
  1271.     # others require no space.  Words are not sufficient . . . .
  1272.     case "`(uname -sr) 2>/dev/null`" in
  1273.     "SunOS 5"*)
  1274.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  1275. echo "configure:1276: checking whether -R must be followed by a space" >&5
  1276.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  1277.       cat > conftest.$ac_ext <<EOF
  1278. #line 1279 "configure"
  1279. #include "confdefs.h"
  1280.  
  1281. int main() {
  1282.  
  1283. ; return 0; }
  1284. EOF
  1285. if { (eval echo configure:1286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1286.   rm -rf conftest*
  1287.   ac_R_nospace=yes
  1288. else
  1289.   echo "configure: failed program was:" >&5
  1290.   cat conftest.$ac_ext >&5
  1291.   rm -rf conftest*
  1292.   ac_R_nospace=no
  1293. fi
  1294. rm -f conftest*
  1295.       if test $ac_R_nospace = yes; then
  1296.     echo "$ac_t""no" 1>&6
  1297.     X_LIBS="$X_LIBS -R$x_libraries"
  1298.       else
  1299.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  1300.     cat > conftest.$ac_ext <<EOF
  1301. #line 1302 "configure"
  1302. #include "confdefs.h"
  1303.  
  1304. int main() {
  1305.  
  1306. ; return 0; }
  1307. EOF
  1308. if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1309.   rm -rf conftest*
  1310.   ac_R_space=yes
  1311. else
  1312.   echo "configure: failed program was:" >&5
  1313.   cat conftest.$ac_ext >&5
  1314.   rm -rf conftest*
  1315.   ac_R_space=no
  1316. fi
  1317. rm -f conftest*
  1318.     if test $ac_R_space = yes; then
  1319.       echo "$ac_t""yes" 1>&6
  1320.       X_LIBS="$X_LIBS -R $x_libraries"
  1321.     else
  1322.       echo "$ac_t""neither works" 1>&6
  1323.     fi
  1324.       fi
  1325.       LIBS="$ac_xsave_LIBS"
  1326.     esac
  1327.   fi
  1328.  
  1329.   # Check for system-dependent libraries X programs must link with.
  1330.   # Do this before checking for the system-independent R6 libraries
  1331.   # (-lICE), since we may need -lsocket or whatever for X linking.
  1332.  
  1333.   if test "$ISC" = yes; then
  1334.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  1335.   else
  1336.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  1337.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  1338.     # the Alpha needs dnet_stub (dnet does not exist).
  1339.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  1340. echo "configure:1341: checking for dnet_ntoa in -ldnet" >&5
  1341. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1342. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1343.   echo $ac_n "(cached) $ac_c" 1>&6
  1344. else
  1345.   ac_save_LIBS="$LIBS"
  1346. LIBS="-ldnet  $LIBS"
  1347. cat > conftest.$ac_ext <<EOF
  1348. #line 1349 "configure"
  1349. #include "confdefs.h"
  1350. /* Override any gcc2 internal prototype to avoid an error.  */
  1351. /* We use char because int might match the return type of a gcc2
  1352.     builtin and then its argument prototype would still apply.  */
  1353. char dnet_ntoa();
  1354.  
  1355. int main() {
  1356. dnet_ntoa()
  1357. ; return 0; }
  1358. EOF
  1359. if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1360.   rm -rf conftest*
  1361.   eval "ac_cv_lib_$ac_lib_var=yes"
  1362. else
  1363.   echo "configure: failed program was:" >&5
  1364.   cat conftest.$ac_ext >&5
  1365.   rm -rf conftest*
  1366.   eval "ac_cv_lib_$ac_lib_var=no"
  1367. fi
  1368. rm -f conftest*
  1369. LIBS="$ac_save_LIBS"
  1370.  
  1371. fi
  1372. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1373.   echo "$ac_t""yes" 1>&6
  1374.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  1375. else
  1376.   echo "$ac_t""no" 1>&6
  1377. fi
  1378.  
  1379.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  1380.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  1381. echo "configure:1382: checking for dnet_ntoa in -ldnet_stub" >&5
  1382. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1383. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1384.   echo $ac_n "(cached) $ac_c" 1>&6
  1385. else
  1386.   ac_save_LIBS="$LIBS"
  1387. LIBS="-ldnet_stub  $LIBS"
  1388. cat > conftest.$ac_ext <<EOF
  1389. #line 1390 "configure"
  1390. #include "confdefs.h"
  1391. /* Override any gcc2 internal prototype to avoid an error.  */
  1392. /* We use char because int might match the return type of a gcc2
  1393.     builtin and then its argument prototype would still apply.  */
  1394. char dnet_ntoa();
  1395.  
  1396. int main() {
  1397. dnet_ntoa()
  1398. ; return 0; }
  1399. EOF
  1400. if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1401.   rm -rf conftest*
  1402.   eval "ac_cv_lib_$ac_lib_var=yes"
  1403. else
  1404.   echo "configure: failed program was:" >&5
  1405.   cat conftest.$ac_ext >&5
  1406.   rm -rf conftest*
  1407.   eval "ac_cv_lib_$ac_lib_var=no"
  1408. fi
  1409. rm -f conftest*
  1410. LIBS="$ac_save_LIBS"
  1411.  
  1412. fi
  1413. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1414.   echo "$ac_t""yes" 1>&6
  1415.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  1416. else
  1417.   echo "$ac_t""no" 1>&6
  1418. fi
  1419.  
  1420.     fi
  1421.  
  1422.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  1423.     # to get the SysV transport functions.
  1424.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  1425.     # needs -lnsl.
  1426.     # The nsl library prevents programs from opening the X display
  1427.     # on Irix 5.2, according to dickey@clark.net.
  1428.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  1429. echo "configure:1430: checking for gethostbyname" >&5
  1430. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  1431.   echo $ac_n "(cached) $ac_c" 1>&6
  1432. else
  1433.   cat > conftest.$ac_ext <<EOF
  1434. #line 1435 "configure"
  1435. #include "confdefs.h"
  1436. /* System header to define __stub macros and hopefully few prototypes,
  1437.     which can conflict with char gethostbyname(); below.  */
  1438. #include <assert.h>
  1439. /* Override any gcc2 internal prototype to avoid an error.  */
  1440. /* We use char because int might match the return type of a gcc2
  1441.     builtin and then its argument prototype would still apply.  */
  1442. char gethostbyname();
  1443.  
  1444. int main() {
  1445.  
  1446. /* The GNU C library defines this for functions which it implements
  1447.     to always fail with ENOSYS.  Some functions are actually named
  1448.     something starting with __ and the normal name is an alias.  */
  1449. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  1450. choke me
  1451. #else
  1452. gethostbyname();
  1453. #endif
  1454.  
  1455. ; return 0; }
  1456. EOF
  1457. if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1458.   rm -rf conftest*
  1459.   eval "ac_cv_func_gethostbyname=yes"
  1460. else
  1461.   echo "configure: failed program was:" >&5
  1462.   cat conftest.$ac_ext >&5
  1463.   rm -rf conftest*
  1464.   eval "ac_cv_func_gethostbyname=no"
  1465. fi
  1466. rm -f conftest*
  1467. fi
  1468.  
  1469. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  1470.   echo "$ac_t""yes" 1>&6
  1471.   :
  1472. else
  1473.   echo "$ac_t""no" 1>&6
  1474. fi
  1475.  
  1476.     if test $ac_cv_func_gethostbyname = no; then
  1477.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  1478. echo "configure:1479: checking for gethostbyname in -lnsl" >&5
  1479. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  1480. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1481.   echo $ac_n "(cached) $ac_c" 1>&6
  1482. else
  1483.   ac_save_LIBS="$LIBS"
  1484. LIBS="-lnsl  $LIBS"
  1485. cat > conftest.$ac_ext <<EOF
  1486. #line 1487 "configure"
  1487. #include "confdefs.h"
  1488. /* Override any gcc2 internal prototype to avoid an error.  */
  1489. /* We use char because int might match the return type of a gcc2
  1490.     builtin and then its argument prototype would still apply.  */
  1491. char gethostbyname();
  1492.  
  1493. int main() {
  1494. gethostbyname()
  1495. ; return 0; }
  1496. EOF
  1497. if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1498.   rm -rf conftest*
  1499.   eval "ac_cv_lib_$ac_lib_var=yes"
  1500. else
  1501.   echo "configure: failed program was:" >&5
  1502.   cat conftest.$ac_ext >&5
  1503.   rm -rf conftest*
  1504.   eval "ac_cv_lib_$ac_lib_var=no"
  1505. fi
  1506. rm -f conftest*
  1507. LIBS="$ac_save_LIBS"
  1508.  
  1509. fi
  1510. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1511.   echo "$ac_t""yes" 1>&6
  1512.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  1513. else
  1514.   echo "$ac_t""no" 1>&6
  1515. fi
  1516.  
  1517.     fi
  1518.  
  1519.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  1520.     # socket/setsockopt and other routines are undefined under SCO ODT
  1521.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  1522.     # on later versions), says simon@lia.di.epfl.ch: it contains
  1523.     # gethostby* variants that don't use the nameserver (or something).
  1524.     # -lsocket must be given before -lnsl if both are needed.
  1525.     # We assume that if connect needs -lnsl, so does gethostbyname.
  1526.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  1527. echo "configure:1528: checking for connect" >&5
  1528. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  1529.   echo $ac_n "(cached) $ac_c" 1>&6
  1530. else
  1531.   cat > conftest.$ac_ext <<EOF
  1532. #line 1533 "configure"
  1533. #include "confdefs.h"
  1534. /* System header to define __stub macros and hopefully few prototypes,
  1535.     which can conflict with char connect(); below.  */
  1536. #include <assert.h>
  1537. /* Override any gcc2 internal prototype to avoid an error.  */
  1538. /* We use char because int might match the return type of a gcc2
  1539.     builtin and then its argument prototype would still apply.  */
  1540. char connect();
  1541.  
  1542. int main() {
  1543.  
  1544. /* The GNU C library defines this for functions which it implements
  1545.     to always fail with ENOSYS.  Some functions are actually named
  1546.     something starting with __ and the normal name is an alias.  */
  1547. #if defined (__stub_connect) || defined (__stub___connect)
  1548. choke me
  1549. #else
  1550. connect();
  1551. #endif
  1552.  
  1553. ; return 0; }
  1554. EOF
  1555. if { (eval echo configure:1556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1556.   rm -rf conftest*
  1557.   eval "ac_cv_func_connect=yes"
  1558. else
  1559.   echo "configure: failed program was:" >&5
  1560.   cat conftest.$ac_ext >&5
  1561.   rm -rf conftest*
  1562.   eval "ac_cv_func_connect=no"
  1563. fi
  1564. rm -f conftest*
  1565. fi
  1566.  
  1567. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  1568.   echo "$ac_t""yes" 1>&6
  1569.   :
  1570. else
  1571.   echo "$ac_t""no" 1>&6
  1572. fi
  1573.  
  1574.     if test $ac_cv_func_connect = no; then
  1575.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  1576. echo "configure:1577: checking for connect in -lsocket" >&5
  1577. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  1578. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1579.   echo $ac_n "(cached) $ac_c" 1>&6
  1580. else
  1581.   ac_save_LIBS="$LIBS"
  1582. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  1583. cat > conftest.$ac_ext <<EOF
  1584. #line 1585 "configure"
  1585. #include "confdefs.h"
  1586. /* Override any gcc2 internal prototype to avoid an error.  */
  1587. /* We use char because int might match the return type of a gcc2
  1588.     builtin and then its argument prototype would still apply.  */
  1589. char connect();
  1590.  
  1591. int main() {
  1592. connect()
  1593. ; return 0; }
  1594. EOF
  1595. if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1596.   rm -rf conftest*
  1597.   eval "ac_cv_lib_$ac_lib_var=yes"
  1598. else
  1599.   echo "configure: failed program was:" >&5
  1600.   cat conftest.$ac_ext >&5
  1601.   rm -rf conftest*
  1602.   eval "ac_cv_lib_$ac_lib_var=no"
  1603. fi
  1604. rm -f conftest*
  1605. LIBS="$ac_save_LIBS"
  1606.  
  1607. fi
  1608. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1609.   echo "$ac_t""yes" 1>&6
  1610.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  1611. else
  1612.   echo "$ac_t""no" 1>&6
  1613. fi
  1614.  
  1615.     fi
  1616.  
  1617.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  1618.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  1619. echo "configure:1620: checking for remove" >&5
  1620. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  1621.   echo $ac_n "(cached) $ac_c" 1>&6
  1622. else
  1623.   cat > conftest.$ac_ext <<EOF
  1624. #line 1625 "configure"
  1625. #include "confdefs.h"
  1626. /* System header to define __stub macros and hopefully few prototypes,
  1627.     which can conflict with char remove(); below.  */
  1628. #include <assert.h>
  1629. /* Override any gcc2 internal prototype to avoid an error.  */
  1630. /* We use char because int might match the return type of a gcc2
  1631.     builtin and then its argument prototype would still apply.  */
  1632. char remove();
  1633.  
  1634. int main() {
  1635.  
  1636. /* The GNU C library defines this for functions which it implements
  1637.     to always fail with ENOSYS.  Some functions are actually named
  1638.     something starting with __ and the normal name is an alias.  */
  1639. #if defined (__stub_remove) || defined (__stub___remove)
  1640. choke me
  1641. #else
  1642. remove();
  1643. #endif
  1644.  
  1645. ; return 0; }
  1646. EOF
  1647. if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1648.   rm -rf conftest*
  1649.   eval "ac_cv_func_remove=yes"
  1650. else
  1651.   echo "configure: failed program was:" >&5
  1652.   cat conftest.$ac_ext >&5
  1653.   rm -rf conftest*
  1654.   eval "ac_cv_func_remove=no"
  1655. fi
  1656. rm -f conftest*
  1657. fi
  1658.  
  1659. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  1660.   echo "$ac_t""yes" 1>&6
  1661.   :
  1662. else
  1663.   echo "$ac_t""no" 1>&6
  1664. fi
  1665.  
  1666.     if test $ac_cv_func_remove = no; then
  1667.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  1668. echo "configure:1669: checking for remove in -lposix" >&5
  1669. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  1670. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1671.   echo $ac_n "(cached) $ac_c" 1>&6
  1672. else
  1673.   ac_save_LIBS="$LIBS"
  1674. LIBS="-lposix  $LIBS"
  1675. cat > conftest.$ac_ext <<EOF
  1676. #line 1677 "configure"
  1677. #include "confdefs.h"
  1678. /* Override any gcc2 internal prototype to avoid an error.  */
  1679. /* We use char because int might match the return type of a gcc2
  1680.     builtin and then its argument prototype would still apply.  */
  1681. char remove();
  1682.  
  1683. int main() {
  1684. remove()
  1685. ; return 0; }
  1686. EOF
  1687. if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1688.   rm -rf conftest*
  1689.   eval "ac_cv_lib_$ac_lib_var=yes"
  1690. else
  1691.   echo "configure: failed program was:" >&5
  1692.   cat conftest.$ac_ext >&5
  1693.   rm -rf conftest*
  1694.   eval "ac_cv_lib_$ac_lib_var=no"
  1695. fi
  1696. rm -f conftest*
  1697. LIBS="$ac_save_LIBS"
  1698.  
  1699. fi
  1700. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1701.   echo "$ac_t""yes" 1>&6
  1702.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  1703. else
  1704.   echo "$ac_t""no" 1>&6
  1705. fi
  1706.  
  1707.     fi
  1708.  
  1709.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  1710.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  1711. echo "configure:1712: checking for shmat" >&5
  1712. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  1713.   echo $ac_n "(cached) $ac_c" 1>&6
  1714. else
  1715.   cat > conftest.$ac_ext <<EOF
  1716. #line 1717 "configure"
  1717. #include "confdefs.h"
  1718. /* System header to define __stub macros and hopefully few prototypes,
  1719.     which can conflict with char shmat(); below.  */
  1720. #include <assert.h>
  1721. /* Override any gcc2 internal prototype to avoid an error.  */
  1722. /* We use char because int might match the return type of a gcc2
  1723.     builtin and then its argument prototype would still apply.  */
  1724. char shmat();
  1725.  
  1726. int main() {
  1727.  
  1728. /* The GNU C library defines this for functions which it implements
  1729.     to always fail with ENOSYS.  Some functions are actually named
  1730.     something starting with __ and the normal name is an alias.  */
  1731. #if defined (__stub_shmat) || defined (__stub___shmat)
  1732. choke me
  1733. #else
  1734. shmat();
  1735. #endif
  1736.  
  1737. ; return 0; }
  1738. EOF
  1739. if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1740.   rm -rf conftest*
  1741.   eval "ac_cv_func_shmat=yes"
  1742. else
  1743.   echo "configure: failed program was:" >&5
  1744.   cat conftest.$ac_ext >&5
  1745.   rm -rf conftest*
  1746.   eval "ac_cv_func_shmat=no"
  1747. fi
  1748. rm -f conftest*
  1749. fi
  1750.  
  1751. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  1752.   echo "$ac_t""yes" 1>&6
  1753.   :
  1754. else
  1755.   echo "$ac_t""no" 1>&6
  1756. fi
  1757.  
  1758.     if test $ac_cv_func_shmat = no; then
  1759.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  1760. echo "configure:1761: checking for shmat in -lipc" >&5
  1761. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  1762. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1763.   echo $ac_n "(cached) $ac_c" 1>&6
  1764. else
  1765.   ac_save_LIBS="$LIBS"
  1766. LIBS="-lipc  $LIBS"
  1767. cat > conftest.$ac_ext <<EOF
  1768. #line 1769 "configure"
  1769. #include "confdefs.h"
  1770. /* Override any gcc2 internal prototype to avoid an error.  */
  1771. /* We use char because int might match the return type of a gcc2
  1772.     builtin and then its argument prototype would still apply.  */
  1773. char shmat();
  1774.  
  1775. int main() {
  1776. shmat()
  1777. ; return 0; }
  1778. EOF
  1779. if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1780.   rm -rf conftest*
  1781.   eval "ac_cv_lib_$ac_lib_var=yes"
  1782. else
  1783.   echo "configure: failed program was:" >&5
  1784.   cat conftest.$ac_ext >&5
  1785.   rm -rf conftest*
  1786.   eval "ac_cv_lib_$ac_lib_var=no"
  1787. fi
  1788. rm -f conftest*
  1789. LIBS="$ac_save_LIBS"
  1790.  
  1791. fi
  1792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1793.   echo "$ac_t""yes" 1>&6
  1794.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  1795. else
  1796.   echo "$ac_t""no" 1>&6
  1797. fi
  1798.  
  1799.     fi
  1800.   fi
  1801.  
  1802.   # Check for libraries that X11R6 Xt/Xaw programs need.
  1803.   ac_save_LDFLAGS="$LDFLAGS"
  1804.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  1805.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  1806.   # check for ICE first), but we must link in the order -lSM -lICE or
  1807.   # we get undefined symbols.  So assume we have SM if we have ICE.
  1808.   # These have to be linked with before -lX11, unlike the other
  1809.   # libraries we check for below, so use a different variable.
  1810.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  1811.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  1812. echo "configure:1813: checking for IceConnectionNumber in -lICE" >&5
  1813. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  1814. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1815.   echo $ac_n "(cached) $ac_c" 1>&6
  1816. else
  1817.   ac_save_LIBS="$LIBS"
  1818. LIBS="-lICE  $LIBS"
  1819. cat > conftest.$ac_ext <<EOF
  1820. #line 1821 "configure"
  1821. #include "confdefs.h"
  1822. /* Override any gcc2 internal prototype to avoid an error.  */
  1823. /* We use char because int might match the return type of a gcc2
  1824.     builtin and then its argument prototype would still apply.  */
  1825. char IceConnectionNumber();
  1826.  
  1827. int main() {
  1828. IceConnectionNumber()
  1829. ; return 0; }
  1830. EOF
  1831. if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1832.   rm -rf conftest*
  1833.   eval "ac_cv_lib_$ac_lib_var=yes"
  1834. else
  1835.   echo "configure: failed program was:" >&5
  1836.   cat conftest.$ac_ext >&5
  1837.   rm -rf conftest*
  1838.   eval "ac_cv_lib_$ac_lib_var=no"
  1839. fi
  1840. rm -f conftest*
  1841. LIBS="$ac_save_LIBS"
  1842.  
  1843. fi
  1844. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1845.   echo "$ac_t""yes" 1>&6
  1846.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  1847. else
  1848.   echo "$ac_t""no" 1>&6
  1849. fi
  1850.  
  1851.   LDFLAGS="$ac_save_LDFLAGS"
  1852.  
  1853. fi
  1854.  
  1855.  
  1856. #Check these header since they cause trouble
  1857. for ac_hdr in \
  1858. stdlib.h \
  1859. unistd.h \
  1860. memory.h \
  1861. fcntl.h \
  1862. malloc.h \
  1863. termios.h \
  1864. sys/socket.h \
  1865. socket.h \
  1866. sys/wait.h \
  1867. netinet/in.h \
  1868. arpa/inet.h \
  1869.  
  1870. do
  1871. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1872. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1873. echo "configure:1874: checking for $ac_hdr" >&5
  1874. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1875.   echo $ac_n "(cached) $ac_c" 1>&6
  1876. else
  1877.   cat > conftest.$ac_ext <<EOF
  1878. #line 1879 "configure"
  1879. #include "confdefs.h"
  1880. #include <$ac_hdr>
  1881. EOF
  1882. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1883. { (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1884. ac_err=`grep -v '^ *+' conftest.out`
  1885. if test -z "$ac_err"; then
  1886.   rm -rf conftest*
  1887.   eval "ac_cv_header_$ac_safe=yes"
  1888. else
  1889.   echo "$ac_err" >&5
  1890.   echo "configure: failed program was:" >&5
  1891.   cat conftest.$ac_ext >&5
  1892.   rm -rf conftest*
  1893.   eval "ac_cv_header_$ac_safe=no"
  1894. fi
  1895. rm -f conftest*
  1896. fi
  1897. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1898.   echo "$ac_t""yes" 1>&6
  1899.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1900.   cat >> confdefs.h <<EOF
  1901. #define $ac_tr_hdr 1
  1902. EOF
  1903.  
  1904. else
  1905.   echo "$ac_t""no" 1>&6
  1906. fi
  1907. done
  1908.  
  1909.  
  1910. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  1911. echo "configure:1912: checking for socket in -lsocket" >&5
  1912. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  1913. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1914.   echo $ac_n "(cached) $ac_c" 1>&6
  1915. else
  1916.   ac_save_LIBS="$LIBS"
  1917. LIBS="-lsocket  $LIBS"
  1918. cat > conftest.$ac_ext <<EOF
  1919. #line 1920 "configure"
  1920. #include "confdefs.h"
  1921. /* Override any gcc2 internal prototype to avoid an error.  */
  1922. /* We use char because int might match the return type of a gcc2
  1923.     builtin and then its argument prototype would still apply.  */
  1924. char socket();
  1925.  
  1926. int main() {
  1927. socket()
  1928. ; return 0; }
  1929. EOF
  1930. if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1931.   rm -rf conftest*
  1932.   eval "ac_cv_lib_$ac_lib_var=yes"
  1933. else
  1934.   echo "configure: failed program was:" >&5
  1935.   cat conftest.$ac_ext >&5
  1936.   rm -rf conftest*
  1937.   eval "ac_cv_lib_$ac_lib_var=no"
  1938. fi
  1939. rm -f conftest*
  1940. LIBS="$ac_save_LIBS"
  1941.  
  1942. fi
  1943. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1944.   echo "$ac_t""yes" 1>&6
  1945.   LIBSOCKET="-lnsl -lsocket"
  1946. else
  1947.   echo "$ac_t""no" 1>&6
  1948. fi
  1949.  echo $ac_n "checking for gethostbyname in -lbsd""... $ac_c" 1>&6
  1950. echo "configure:1951: checking for gethostbyname in -lbsd" >&5
  1951. ac_lib_var=`echo bsd'_'gethostbyname | sed 'y%./+-%__p_%'`
  1952. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1953.   echo $ac_n "(cached) $ac_c" 1>&6
  1954. else
  1955.   ac_save_LIBS="$LIBS"
  1956. LIBS="-lbsd  $LIBS"
  1957. cat > conftest.$ac_ext <<EOF
  1958. #line 1959 "configure"
  1959. #include "confdefs.h"
  1960. /* Override any gcc2 internal prototype to avoid an error.  */
  1961. /* We use char because int might match the return type of a gcc2
  1962.     builtin and then its argument prototype would still apply.  */
  1963. char gethostbyname();
  1964.  
  1965. int main() {
  1966. gethostbyname()
  1967. ; return 0; }
  1968. EOF
  1969. if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1970.   rm -rf conftest*
  1971.   eval "ac_cv_lib_$ac_lib_var=yes"
  1972. else
  1973.   echo "configure: failed program was:" >&5
  1974.   cat conftest.$ac_ext >&5
  1975.   rm -rf conftest*
  1976.   eval "ac_cv_lib_$ac_lib_var=no"
  1977. fi
  1978. rm -f conftest*
  1979. LIBS="$ac_save_LIBS"
  1980.  
  1981. fi
  1982. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1983.   echo "$ac_t""yes" 1>&6
  1984.   LIBSOCKET="-lbsd"
  1985. else
  1986.   echo "$ac_t""no" 1>&6
  1987. fi
  1988.  
  1989.  
  1990. ac_header_dirent=no
  1991. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1992. do
  1993. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1994. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1995. echo "configure:1996: checking for $ac_hdr that defines DIR" >&5
  1996. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1997.   echo $ac_n "(cached) $ac_c" 1>&6
  1998. else
  1999.   cat > conftest.$ac_ext <<EOF
  2000. #line 2001 "configure"
  2001. #include "confdefs.h"
  2002. #include <sys/types.h>
  2003. #include <$ac_hdr>
  2004. int main() {
  2005. DIR *dirp = 0;
  2006. ; return 0; }
  2007. EOF
  2008. if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2009.   rm -rf conftest*
  2010.   eval "ac_cv_header_dirent_$ac_safe=yes"
  2011. else
  2012.   echo "configure: failed program was:" >&5
  2013.   cat conftest.$ac_ext >&5
  2014.   rm -rf conftest*
  2015.   eval "ac_cv_header_dirent_$ac_safe=no"
  2016. fi
  2017. rm -f conftest*
  2018. fi
  2019. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  2020.   echo "$ac_t""yes" 1>&6
  2021.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2022.   cat >> confdefs.h <<EOF
  2023. #define $ac_tr_hdr 1
  2024. EOF
  2025.  ac_header_dirent=$ac_hdr; break
  2026. else
  2027.   echo "$ac_t""no" 1>&6
  2028. fi
  2029. done
  2030. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  2031. if test $ac_header_dirent = dirent.h; then
  2032. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  2033. echo "configure:2034: checking for opendir in -ldir" >&5
  2034. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  2035. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2036.   echo $ac_n "(cached) $ac_c" 1>&6
  2037. else
  2038.   ac_save_LIBS="$LIBS"
  2039. LIBS="-ldir  $LIBS"
  2040. cat > conftest.$ac_ext <<EOF
  2041. #line 2042 "configure"
  2042. #include "confdefs.h"
  2043. /* Override any gcc2 internal prototype to avoid an error.  */
  2044. /* We use char because int might match the return type of a gcc2
  2045.     builtin and then its argument prototype would still apply.  */
  2046. char opendir();
  2047.  
  2048. int main() {
  2049. opendir()
  2050. ; return 0; }
  2051. EOF
  2052. if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2053.   rm -rf conftest*
  2054.   eval "ac_cv_lib_$ac_lib_var=yes"
  2055. else
  2056.   echo "configure: failed program was:" >&5
  2057.   cat conftest.$ac_ext >&5
  2058.   rm -rf conftest*
  2059.   eval "ac_cv_lib_$ac_lib_var=no"
  2060. fi
  2061. rm -f conftest*
  2062. LIBS="$ac_save_LIBS"
  2063.  
  2064. fi
  2065. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2066.   echo "$ac_t""yes" 1>&6
  2067.   LIBS="$LIBS -ldir"
  2068. else
  2069.   echo "$ac_t""no" 1>&6
  2070. fi
  2071.  
  2072. else
  2073. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  2074. echo "configure:2075: checking for opendir in -lx" >&5
  2075. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  2076. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2077.   echo $ac_n "(cached) $ac_c" 1>&6
  2078. else
  2079.   ac_save_LIBS="$LIBS"
  2080. LIBS="-lx  $LIBS"
  2081. cat > conftest.$ac_ext <<EOF
  2082. #line 2083 "configure"
  2083. #include "confdefs.h"
  2084. /* Override any gcc2 internal prototype to avoid an error.  */
  2085. /* We use char because int might match the return type of a gcc2
  2086.     builtin and then its argument prototype would still apply.  */
  2087. char opendir();
  2088.  
  2089. int main() {
  2090. opendir()
  2091. ; return 0; }
  2092. EOF
  2093. if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2094.   rm -rf conftest*
  2095.   eval "ac_cv_lib_$ac_lib_var=yes"
  2096. else
  2097.   echo "configure: failed program was:" >&5
  2098.   cat conftest.$ac_ext >&5
  2099.   rm -rf conftest*
  2100.   eval "ac_cv_lib_$ac_lib_var=no"
  2101. fi
  2102. rm -f conftest*
  2103. LIBS="$ac_save_LIBS"
  2104.  
  2105. fi
  2106. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2107.   echo "$ac_t""yes" 1>&6
  2108.   LIBS="$LIBS -lx"
  2109. else
  2110.   echo "$ac_t""no" 1>&6
  2111. fi
  2112.  
  2113. fi
  2114.  
  2115.  
  2116. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2117. echo "configure:2118: checking for ANSI C header files" >&5
  2118. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  2119.   echo $ac_n "(cached) $ac_c" 1>&6
  2120. else
  2121.   cat > conftest.$ac_ext <<EOF
  2122. #line 2123 "configure"
  2123. #include "confdefs.h"
  2124. #include <stdlib.h>
  2125. #include <stdarg.h>
  2126. #include <string.h>
  2127. #include <float.h>
  2128. EOF
  2129. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2130. { (eval echo configure:2131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2131. ac_err=`grep -v '^ *+' conftest.out`
  2132. if test -z "$ac_err"; then
  2133.   rm -rf conftest*
  2134.   ac_cv_header_stdc=yes
  2135. else
  2136.   echo "$ac_err" >&5
  2137.   echo "configure: failed program was:" >&5
  2138.   cat conftest.$ac_ext >&5
  2139.   rm -rf conftest*
  2140.   ac_cv_header_stdc=no
  2141. fi
  2142. rm -f conftest*
  2143.  
  2144. if test $ac_cv_header_stdc = yes; then
  2145.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2146. cat > conftest.$ac_ext <<EOF
  2147. #line 2148 "configure"
  2148. #include "confdefs.h"
  2149. #include <string.h>
  2150. EOF
  2151. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2152.   egrep "memchr" >/dev/null 2>&1; then
  2153.   :
  2154. else
  2155.   rm -rf conftest*
  2156.   ac_cv_header_stdc=no
  2157. fi
  2158. rm -f conftest*
  2159.  
  2160. fi
  2161.  
  2162. if test $ac_cv_header_stdc = yes; then
  2163.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2164. cat > conftest.$ac_ext <<EOF
  2165. #line 2166 "configure"
  2166. #include "confdefs.h"
  2167. #include <stdlib.h>
  2168. EOF
  2169. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2170.   egrep "free" >/dev/null 2>&1; then
  2171.   :
  2172. else
  2173.   rm -rf conftest*
  2174.   ac_cv_header_stdc=no
  2175. fi
  2176. rm -f conftest*
  2177.  
  2178. fi
  2179.  
  2180. if test $ac_cv_header_stdc = yes; then
  2181.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2182. if test "$cross_compiling" = yes; then
  2183.   :
  2184. else
  2185.   cat > conftest.$ac_ext <<EOF
  2186. #line 2187 "configure"
  2187. #include "confdefs.h"
  2188. #include <ctype.h>
  2189. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2190. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2191. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2192. int main () { int i; for (i = 0; i < 256; i++)
  2193. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2194. exit (0); }
  2195.  
  2196. EOF
  2197. if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2198. then
  2199.   :
  2200. else
  2201.   echo "configure: failed program was:" >&5
  2202.   cat conftest.$ac_ext >&5
  2203.   rm -fr conftest*
  2204.   ac_cv_header_stdc=no
  2205. fi
  2206. rm -fr conftest*
  2207. fi
  2208.  
  2209. fi
  2210. fi
  2211.  
  2212. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2213. if test $ac_cv_header_stdc = yes; then
  2214.   cat >> confdefs.h <<\EOF
  2215. #define STDC_HEADERS 1
  2216. EOF
  2217.  
  2218. fi
  2219.  
  2220. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  2221. echo "configure:2222: checking for mode_t" >&5
  2222. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  2223.   echo $ac_n "(cached) $ac_c" 1>&6
  2224. else
  2225.   cat > conftest.$ac_ext <<EOF
  2226. #line 2227 "configure"
  2227. #include "confdefs.h"
  2228. #include <sys/types.h>
  2229. #if STDC_HEADERS
  2230. #include <stdlib.h>
  2231. #include <stddef.h>
  2232. #endif
  2233. EOF
  2234. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2235.   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2236.   rm -rf conftest*
  2237.   ac_cv_type_mode_t=yes
  2238. else
  2239.   rm -rf conftest*
  2240.   ac_cv_type_mode_t=no
  2241. fi
  2242. rm -f conftest*
  2243.  
  2244. fi
  2245. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  2246. if test $ac_cv_type_mode_t = no; then
  2247.   cat >> confdefs.h <<\EOF
  2248. #define mode_t int
  2249. EOF
  2250.  
  2251. fi
  2252.  
  2253. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2254. echo "configure:2255: checking for pid_t" >&5
  2255. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2256.   echo $ac_n "(cached) $ac_c" 1>&6
  2257. else
  2258.   cat > conftest.$ac_ext <<EOF
  2259. #line 2260 "configure"
  2260. #include "confdefs.h"
  2261. #include <sys/types.h>
  2262. #if STDC_HEADERS
  2263. #include <stdlib.h>
  2264. #include <stddef.h>
  2265. #endif
  2266. EOF
  2267. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2268.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2269.   rm -rf conftest*
  2270.   ac_cv_type_pid_t=yes
  2271. else
  2272.   rm -rf conftest*
  2273.   ac_cv_type_pid_t=no
  2274. fi
  2275. rm -f conftest*
  2276.  
  2277. fi
  2278. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2279. if test $ac_cv_type_pid_t = no; then
  2280.   cat >> confdefs.h <<\EOF
  2281. #define pid_t int
  2282. EOF
  2283.  
  2284. fi
  2285.  
  2286. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2287. echo "configure:2288: checking for uid_t in sys/types.h" >&5
  2288. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  2289.   echo $ac_n "(cached) $ac_c" 1>&6
  2290. else
  2291.   cat > conftest.$ac_ext <<EOF
  2292. #line 2293 "configure"
  2293. #include "confdefs.h"
  2294. #include <sys/types.h>
  2295. EOF
  2296. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2297.   egrep "uid_t" >/dev/null 2>&1; then
  2298.   rm -rf conftest*
  2299.   ac_cv_type_uid_t=yes
  2300. else
  2301.   rm -rf conftest*
  2302.   ac_cv_type_uid_t=no
  2303. fi
  2304. rm -f conftest*
  2305.  
  2306. fi
  2307.  
  2308. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2309. if test $ac_cv_type_uid_t = no; then
  2310.   cat >> confdefs.h <<\EOF
  2311. #define uid_t int
  2312. EOF
  2313.  
  2314.   cat >> confdefs.h <<\EOF
  2315. #define gid_t int
  2316. EOF
  2317.  
  2318. fi
  2319.  
  2320.  
  2321. for ac_func in \
  2322. memset \
  2323. memcpy \
  2324. putenv \
  2325. getcwd \
  2326. getdomainname \
  2327. sigaction \
  2328. sigemptyset \
  2329. sigprocmask \
  2330. sigaddset \
  2331. siglongjmp
  2332.  
  2333. do
  2334. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2335. echo "configure:2336: checking for $ac_func" >&5
  2336. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2337.   echo $ac_n "(cached) $ac_c" 1>&6
  2338. else
  2339.   cat > conftest.$ac_ext <<EOF
  2340. #line 2341 "configure"
  2341. #include "confdefs.h"
  2342. /* System header to define __stub macros and hopefully few prototypes,
  2343.     which can conflict with char $ac_func(); below.  */
  2344. #include <assert.h>
  2345. /* Override any gcc2 internal prototype to avoid an error.  */
  2346. /* We use char because int might match the return type of a gcc2
  2347.     builtin and then its argument prototype would still apply.  */
  2348. char $ac_func();
  2349.  
  2350. int main() {
  2351.  
  2352. /* The GNU C library defines this for functions which it implements
  2353.     to always fail with ENOSYS.  Some functions are actually named
  2354.     something starting with __ and the normal name is an alias.  */
  2355. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2356. choke me
  2357. #else
  2358. $ac_func();
  2359. #endif
  2360.  
  2361. ; return 0; }
  2362. EOF
  2363. if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2364.   rm -rf conftest*
  2365.   eval "ac_cv_func_$ac_func=yes"
  2366. else
  2367.   echo "configure: failed program was:" >&5
  2368.   cat conftest.$ac_ext >&5
  2369.   rm -rf conftest*
  2370.   eval "ac_cv_func_$ac_func=no"
  2371. fi
  2372. rm -f conftest*
  2373. fi
  2374.  
  2375. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2376.   echo "$ac_t""yes" 1>&6
  2377.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2378.   cat >> confdefs.h <<EOF
  2379. #define $ac_tr_func 1
  2380. EOF
  2381.  
  2382. else
  2383.   echo "$ac_t""no" 1>&6
  2384. fi
  2385. done
  2386.  
  2387.  
  2388. echo $ac_n "checking for domain in /etc/resolv.conf""... $ac_c" 1>&6
  2389. echo "configure:2390: checking for domain in /etc/resolv.conf" >&5
  2390. if eval "test \"`echo '$''{'slrn_cv_domain'+set}'`\" = set"; then
  2391.   echo $ac_n "(cached) $ac_c" 1>&6
  2392. else
  2393.   if test -f /etc/resolv.conf; then
  2394.     slrn_cv_domain=`(grep "^domain" /etc/resolv.conf ||
  2395.                      grep "^search" /etc/resolv.conf) |
  2396.             awk '{ print $2 }' | head -1`
  2397.  fi
  2398.  if test -z "$slrn_cv_domain"; then
  2399.     slrn_cv_domain=no
  2400.  fi
  2401.  
  2402. fi
  2403.  
  2404. echo "$ac_t""$slrn_cv_domain" 1>&6
  2405.  
  2406. if test "$slrn_cv_domain" != no; then
  2407.     cat >> confdefs.h <<\EOF
  2408. #define USE_DOMAIN_NAME 1
  2409. EOF
  2410.  
  2411.     cat >> confdefs.h <<EOF
  2412. #define MY_DOMAIN_NAME "${slrn_cv_domain}"
  2413. EOF
  2414.  
  2415. fi
  2416.  
  2417.  
  2418.  
  2419. #---------------------------------------------------------------------------
  2420. # Set the source directory and object directory.   The makefile assumes an
  2421. # abcolute path name.  This is because src/Makefile cds to OBJDIR and compiles
  2422. # the src file which is in SRCDIR
  2423. #---------------------------------------------------------------------------
  2424. SRCDIR=$CONFIG_DIR
  2425. if test "" != "."
  2426. then
  2427.   if test -z ""
  2428.   then
  2429.     SRCDIR=$SRCDIR/src
  2430.   else
  2431.     SRCDIR=$SRCDIR/
  2432.   fi
  2433. fi
  2434.  
  2435. OBJDIR=$SRCDIR/"$ARCH"objs
  2436. ELFDIR=$SRCDIR/elf"$ARCH"objs
  2437.  
  2438.  
  2439. JD_Terminfo_Dirs="/usr/lib/terminfo \
  2440.                  /usr/share/terminfo \
  2441.                  /usr/share/lib/terminfo \
  2442.          /usr/local/lib/terminfo"
  2443.  
  2444. TERMCAP=-ltermcap
  2445.  
  2446. echo $ac_n "checking for Terminfo""... $ac_c" 1>&6
  2447. echo "configure:2448: checking for Terminfo" >&5
  2448. for terminfo_dir in $JD_Terminfo_Dirs
  2449. do
  2450.    if test -d $terminfo_dir 
  2451.    then
  2452.       echo "$ac_t""yes" 1>&6
  2453.       TERMCAP=""
  2454.       break
  2455.    fi
  2456. done
  2457. if test "$TERMCAP"; then
  2458.   echo "$ac_t""no" 1>&6
  2459.   cat >> confdefs.h <<\EOF
  2460. #define USE_TERMCAP 1
  2461. EOF
  2462.  
  2463. fi
  2464.  
  2465.  
  2466.  
  2467. # Look for the JD_UP_NAME package
  2468. #JD_UP_NAME[]_INCLUDE=""
  2469. #JD_UP_NAME[]_LIB_DIR=""
  2470.  
  2471. # This list consists of "include,lib include,lib ..."
  2472. JD_Search_Dirs="$JD_Above_Dir2/slang/libsrc,$JD_Above_Dir2/slang/libsrc/"$ARCH"objs \
  2473.                 $JD_Above_Dir/slang/libsrc,$JD_Above_Dir/slang/libsrc/"$ARCH"objs \
  2474.         $JD_Above_Dir2/slang/src,$JD_Above_Dir2/slang/src/"$ARCH"objs \
  2475.                 $JD_Above_Dir/slang/src,$JD_Above_Dir/slang/src/"$ARCH"objs \
  2476.         $HOME/include,$HOME/lib"
  2477.  
  2478. if test -n "$ARCH"
  2479. then
  2480.  JD_Search_Dirs="$JD_Search_Dirs $HOME/include,$HOME/$ARCH/lib"
  2481.  JD_Search_Dirs="$JD_Search_Dirs $HOME/include,$HOME/sys/$ARCH/lib"
  2482. fi
  2483.  
  2484. # Now add the standard system includes.  The reason for doing this is that 
  2485. # the other directories may have a better chance of containing a more recent
  2486. # version.
  2487.  
  2488. JD_Search_Dirs="$JD_Search_Dirs \
  2489.                 $includedir,$libdir \
  2490.                 /usr/local/include,/usr/local/lib \
  2491.         /usr/include,/usr/lib \
  2492.         /usr/include/slang,/usr/lib \
  2493.         /usr/include/slang,/usr/lib/slang"
  2494.  
  2495. echo looking for the SLANG library
  2496.  
  2497. for include_and_lib in $JD_Search_Dirs
  2498. do
  2499.   # Yuk.  Is there a better way to set these variables??
  2500.   generic_include=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
  2501.   generic_lib=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
  2502.   echo Looking for slang.h in $generic_include
  2503.   echo and libslang.a in $generic_lib
  2504.   if test -r $generic_include/slang.h && test -r $generic_lib/libslang.a
  2505.   then
  2506.     echo Found it.
  2507.     SLANG_LIB_DIR="$generic_lib"
  2508.     SLANG_INCLUDE="$generic_include"
  2509.     break
  2510.   else
  2511.     if test -r $generic_include/slang.h && test -r $generic_lib/libslang.so
  2512.     then
  2513.       echo Found it.
  2514.       SLANG_LIB_DIR="$generic_lib"
  2515.       SLANG_INCLUDE="$generic_include"
  2516.       break
  2517.     fi
  2518.   fi
  2519. done
  2520.  
  2521. if test -n "$SLANG_LIB_DIR"
  2522. then
  2523.     jd_have_slang="yes"
  2524. else
  2525.     echo Unable to find the $SLANG library.  
  2526.     echo You may have to edit $CONFIG_DIR/src/Makefile.
  2527.     SLANG_INCLUDE=$JD_Above_Dir/slang/src
  2528.     SLANG_LIB_DIR=$JD_Above_Dir/slang/src/"$ARCH"objs
  2529.     jd_have_slang="no"
  2530. fi
  2531.  
  2532. SLANG_INC="-I$SLANG_INCLUDE"
  2533. SLANG_LIB="-L$SLANG_LIB_DIR"
  2534.  
  2535. # gcc under solaris is often not installed correctly.  Avoid specifying
  2536. # -I/usr/include.
  2537. if test "$SLANGINC" = "-I/usr/include"
  2538. then
  2539.     SLANG_INC=""
  2540. fi
  2541.  
  2542. if test "$SLANGLIB" = "-I/usr/lib"
  2543. then
  2544.     SLANG_LIB=""
  2545. fi
  2546.  
  2547.  
  2548.  
  2549.  
  2550. # Check whether --enable-warnings or --disable-warnings was given.
  2551. if test "${enable_warnings+set}" = set; then
  2552.   enableval="$enable_warnings"
  2553.   gcc_warnings=$enableval
  2554. fi
  2555.  
  2556. if test -n "$GCC"
  2557. then
  2558.   CFLAGS="$CFLAGS -fno-strength-reduce"
  2559.   if test -n "$gcc_warnings"
  2560.   then
  2561.     CFLAGS="$CFLAGS -Wall \
  2562.             -Wpointer-arith -Wcast-align -Wcast-qual \
  2563.         -Wtraditional -Wstrict-prototypes \
  2564.         -Wshadow \
  2565.         -Wconversion \
  2566.         -Waggregate-return \
  2567.         -Wmissing-prototypes \
  2568.         -Wnested-externs"
  2569.     # Now trim excess whitespace
  2570.     CFLAGS=`echo $CFLAGS`
  2571.   fi
  2572. fi
  2573.  
  2574.  
  2575.  if test -z "src/modules.lis"
  2576.  then
  2577.    Program_Modules=""
  2578.  else
  2579.    Program_Modules=`cat src/modules.lis`
  2580.  fi
  2581.  PROGRAM_OFILES=""
  2582.  PROGRAM_OBJECTS=""
  2583.  PROGRAM_ELFOBJECTS=""
  2584.  PROGRAM_OBJECT_RULES=""
  2585.  PROGRAM_ELF_ORULES=""
  2586.  for program_module in $Program_Modules; do
  2587.    PROGRAM_OFILES="$PROGRAM_OFILES $program_module.o"
  2588.    PROGRAM_OBJECTS="$PROGRAM_OBJECTS \$(OBJDIR)/$program_module.o"
  2589.    PROGRAM_ELFOBJECTS="$PROGRAM_ELFOBJECTS \$(ELFDIR)/$program_module.o"
  2590.  done
  2591.  
  2592.  
  2593.  for program_module in $Program_Modules; do
  2594.    
  2595. PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
  2596. \$(OBJDIR)/$program_module.o : \$(SRCDIR)/$program_module.c \$(DOT_O_DEPS) \$("$program_module"_O_DEP)
  2597.     cd \$(OBJDIR); \$(COMPILE_CMD) \$(SRCDIR)/$program_module.c
  2598. "
  2599.  
  2600.    
  2601. PROGRAM_ELF_ORULES="$PROGRAM_ELF_ORULES
  2602. \$(ELFDIR)/$program_module.o : \$(SRCDIR)/$program_module.c \$(DOT_O_DEPS) \$("$program_module"_O_DEP)
  2603.     cd \$(ELFDIR); \$(ELFCOMPILE_CMD) \$(SRCDIR)/$program_module.c
  2604. "
  2605.  
  2606.  done
  2607.  
  2608.  
  2609.  
  2610. trap '' 1 2 15
  2611. cat > confcache <<\EOF
  2612. # This file is a shell script that caches the results of configure
  2613. # tests run on this system so they can be shared between configure
  2614. # scripts and configure runs.  It is not useful on other systems.
  2615. # If it contains results you don't want to keep, you may remove or edit it.
  2616. #
  2617. # By default, configure uses ./config.cache as the cache file,
  2618. # creating it if it does not exist already.  You can give configure
  2619. # the --cache-file=FILE option to use a different cache file; that is
  2620. # what configure does when it calls configure scripts in
  2621. # subdirectories, so they share the cache.
  2622. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2623. # config.status only pays attention to the cache file if you give it the
  2624. # --recheck option to rerun configure.
  2625. #
  2626. EOF
  2627. # The following way of writing the cache mishandles newlines in values,
  2628. # but we know of no workaround that is simple, portable, and efficient.
  2629. # So, don't put newlines in cache variables' values.
  2630. # Ultrix sh set writes to stderr and can't be redirected directly,
  2631. # and sets the high bit in the cache file unless we assign to the vars.
  2632. (set) 2>&1 |
  2633.   case `(ac_space=' '; set) 2>&1` in
  2634.   *ac_space=\ *)
  2635.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2636.     # turns \\\\ into \\, and sed turns \\ into \).
  2637.     sed -n \
  2638.       -e "s/'/'\\\\''/g" \
  2639.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2640.     ;;
  2641.   *)
  2642.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2643.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2644.     ;;
  2645.   esac >> confcache
  2646. if cmp -s $cache_file confcache; then
  2647.   :
  2648. else
  2649.   if test -w $cache_file; then
  2650.     echo "updating cache $cache_file"
  2651.     cat confcache > $cache_file
  2652.   else
  2653.     echo "not updating unwritable cache $cache_file"
  2654.   fi
  2655. fi
  2656. rm -f confcache
  2657.  
  2658. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2659.  
  2660. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2661. # Let make expand exec_prefix.
  2662. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2663.  
  2664. # Any assignment to VPATH causes Sun make to only execute
  2665. # the first set of double-colon rules, so remove it if not needed.
  2666. # If there is a colon in the path, we need to keep it.
  2667. if test "x$srcdir" = x.; then
  2668.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2669. fi
  2670.  
  2671. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2672.  
  2673. DEFS=-DHAVE_CONFIG_H
  2674.  
  2675. # Without the "./", some shells look in PATH for config.status.
  2676. : ${CONFIG_STATUS=./config.status}
  2677.  
  2678. echo creating $CONFIG_STATUS
  2679. rm -f $CONFIG_STATUS
  2680. cat > $CONFIG_STATUS <<EOF
  2681. #! /bin/sh
  2682. # Generated automatically by configure.
  2683. # Run this file to recreate the current configuration.
  2684. # This directory was configured as follows,
  2685. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2686. #
  2687. # $0 $ac_configure_args
  2688. #
  2689. # Compiler output produced by configure, useful for debugging
  2690. # configure, is in ./config.log if it exists.
  2691.  
  2692. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2693. for ac_option
  2694. do
  2695.   case "\$ac_option" in
  2696.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2697.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2698.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2699.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2700.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  2701.     exit 0 ;;
  2702.   -help | --help | --hel | --he | --h)
  2703.     echo "\$ac_cs_usage"; exit 0 ;;
  2704.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2705.   esac
  2706. done
  2707.  
  2708. ac_given_srcdir=$srcdir
  2709. ac_given_INSTALL="$INSTALL"
  2710.  
  2711. trap 'rm -fr `echo "Makefile:autoconf/Makefile.in src/Makefile src/sysconf.h:src/config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2712. EOF
  2713. cat >> $CONFIG_STATUS <<EOF
  2714.  
  2715. # Protect against being on the right side of a sed subst in config.status.
  2716. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2717.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2718. $ac_vpsub
  2719. $extrasub
  2720. s%@CFLAGS@%$CFLAGS%g
  2721. s%@CPPFLAGS@%$CPPFLAGS%g
  2722. s%@CXXFLAGS@%$CXXFLAGS%g
  2723. s%@DEFS@%$DEFS%g
  2724. s%@LDFLAGS@%$LDFLAGS%g
  2725. s%@LIBS@%$LIBS%g
  2726. s%@exec_prefix@%$exec_prefix%g
  2727. s%@prefix@%$prefix%g
  2728. s%@program_transform_name@%$program_transform_name%g
  2729. s%@bindir@%$bindir%g
  2730. s%@sbindir@%$sbindir%g
  2731. s%@libexecdir@%$libexecdir%g
  2732. s%@datadir@%$datadir%g
  2733. s%@sysconfdir@%$sysconfdir%g
  2734. s%@sharedstatedir@%$sharedstatedir%g
  2735. s%@localstatedir@%$localstatedir%g
  2736. s%@libdir@%$libdir%g
  2737. s%@includedir@%$includedir%g
  2738. s%@oldincludedir@%$oldincludedir%g
  2739. s%@infodir@%$infodir%g
  2740. s%@mandir@%$mandir%g
  2741. s%@CONFIG_DIR@%$CONFIG_DIR%g
  2742. s%@CC@%$CC%g
  2743. s%@CPP@%$CPP%g
  2744. s%@SET_MAKE@%$SET_MAKE%g
  2745. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2746. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2747. s%@X_CFLAGS@%$X_CFLAGS%g
  2748. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  2749. s%@X_LIBS@%$X_LIBS%g
  2750. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  2751. s%@LIBSOCKET@%$LIBSOCKET%g
  2752. s%@SRCDIR@%$SRCDIR%g
  2753. s%@OBJDIR@%$OBJDIR%g
  2754. s%@ELFDIR@%$ELFDIR%g
  2755. s%@TERMCAP@%$TERMCAP%g
  2756. s%@SLANG_LIB@%$SLANG_LIB%g
  2757. s%@SLANG_INC@%$SLANG_INC%g
  2758. s%@SLANG_LIB_DIR@%$SLANG_LIB_DIR%g
  2759. s%@SLANG_INCLUDE@%$SLANG_INCLUDE%g
  2760. s%@PROGRAM_OFILES@%$PROGRAM_OFILES%g
  2761. s%@PROGRAM_OBJECTS@%$PROGRAM_OBJECTS%g
  2762. s%@PROGRAM_ELFOBJECTS@%$PROGRAM_ELFOBJECTS%g
  2763.  
  2764. CEOF
  2765. EOF
  2766.  
  2767. cat >> $CONFIG_STATUS <<\EOF
  2768.  
  2769. # Split the substitutions into bite-sized pieces for seds with
  2770. # small command number limits, like on Digital OSF/1 and HP-UX.
  2771. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2772. ac_file=1 # Number of current file.
  2773. ac_beg=1 # First line for current file.
  2774. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2775. ac_more_lines=:
  2776. ac_sed_cmds=""
  2777. while $ac_more_lines; do
  2778.   if test $ac_beg -gt 1; then
  2779.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2780.   else
  2781.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2782.   fi
  2783.   if test ! -s conftest.s$ac_file; then
  2784.     ac_more_lines=false
  2785.     rm -f conftest.s$ac_file
  2786.   else
  2787.     if test -z "$ac_sed_cmds"; then
  2788.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2789.     else
  2790.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2791.     fi
  2792.     ac_file=`expr $ac_file + 1`
  2793.     ac_beg=$ac_end
  2794.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2795.   fi
  2796. done
  2797. if test -z "$ac_sed_cmds"; then
  2798.   ac_sed_cmds=cat
  2799. fi
  2800. EOF
  2801.  
  2802. cat >> $CONFIG_STATUS <<EOF
  2803.  
  2804. CONFIG_FILES=\${CONFIG_FILES-"Makefile:autoconf/Makefile.in src/Makefile"}
  2805. EOF
  2806. cat >> $CONFIG_STATUS <<\EOF
  2807. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2808.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2809.   case "$ac_file" in
  2810.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2811.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2812.   *) ac_file_in="${ac_file}.in" ;;
  2813.   esac
  2814.  
  2815.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2816.  
  2817.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2818.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2819.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2820.     # The file is in a subdirectory.
  2821.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2822.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2823.     # A "../" for each directory in $ac_dir_suffix.
  2824.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2825.   else
  2826.     ac_dir_suffix= ac_dots=
  2827.   fi
  2828.  
  2829.   case "$ac_given_srcdir" in
  2830.   .)  srcdir=.
  2831.       if test -z "$ac_dots"; then top_srcdir=.
  2832.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2833.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2834.   *) # Relative path.
  2835.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2836.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2837.   esac
  2838.  
  2839.   case "$ac_given_INSTALL" in
  2840.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2841.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2842.   esac
  2843.  
  2844.   echo creating "$ac_file"
  2845.   rm -f "$ac_file"
  2846.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2847.   case "$ac_file" in
  2848.   *Makefile*) ac_comsub="1i\\
  2849. # $configure_input" ;;
  2850.   *) ac_comsub= ;;
  2851.   esac
  2852.  
  2853.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2854.   sed -e "$ac_comsub
  2855. s%@configure_input@%$configure_input%g
  2856. s%@srcdir@%$srcdir%g
  2857. s%@top_srcdir@%$top_srcdir%g
  2858. s%@INSTALL@%$INSTALL%g
  2859. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2860. fi; done
  2861. rm -f conftest.s*
  2862.  
  2863. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2864. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2865. #
  2866. # ac_d sets the value in "#define NAME VALUE" lines.
  2867. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2868. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2869. ac_dC='\3'
  2870. ac_dD='%g'
  2871. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2872. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2873. ac_uB='\([     ]\)%\1#\2define\3'
  2874. ac_uC=' '
  2875. ac_uD='\4%g'
  2876. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2877. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2878. ac_eB='$%\1#\2define\3'
  2879. ac_eC=' '
  2880. ac_eD='%g'
  2881.  
  2882. if test "${CONFIG_HEADERS+set}" != set; then
  2883. EOF
  2884. cat >> $CONFIG_STATUS <<EOF
  2885.   CONFIG_HEADERS="src/sysconf.h:src/config.hin"
  2886. EOF
  2887. cat >> $CONFIG_STATUS <<\EOF
  2888. fi
  2889. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2890.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2891.   case "$ac_file" in
  2892.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2893.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2894.   *) ac_file_in="${ac_file}.in" ;;
  2895.   esac
  2896.  
  2897.   echo creating $ac_file
  2898.  
  2899.   rm -f conftest.frag conftest.in conftest.out
  2900.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2901.   cat $ac_file_inputs > conftest.in
  2902.  
  2903. EOF
  2904.  
  2905. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2906. # the proper values into config.h.in to produce config.h.  And first:
  2907. # Protect against being on the right side of a sed subst in config.status.
  2908. # Protect against being in an unquoted here document in config.status.
  2909. rm -f conftest.vals
  2910. cat > conftest.hdr <<\EOF
  2911. s/[\\&%]/\\&/g
  2912. s%[\\$`]%\\&%g
  2913. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2914. s%ac_d%ac_u%gp
  2915. s%ac_u%ac_e%gp
  2916. EOF
  2917. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2918. rm -f conftest.hdr
  2919.  
  2920. # This sed command replaces #undef with comments.  This is necessary, for
  2921. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2922. # on some systems where configure will not decide to define it.
  2923. cat >> conftest.vals <<\EOF
  2924. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2925. EOF
  2926.  
  2927. # Break up conftest.vals because some shells have a limit on
  2928. # the size of here documents, and old seds have small limits too.
  2929.  
  2930. rm -f conftest.tail
  2931. while :
  2932. do
  2933.   ac_lines=`grep -c . conftest.vals`
  2934.   # grep -c gives empty output for an empty file on some AIX systems.
  2935.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2936.   # Write a limited-size here document to conftest.frag.
  2937.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2938.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2939.   echo 'CEOF
  2940.   sed -f conftest.frag conftest.in > conftest.out
  2941.   rm -f conftest.in
  2942.   mv conftest.out conftest.in
  2943. ' >> $CONFIG_STATUS
  2944.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2945.   rm -f conftest.vals
  2946.   mv conftest.tail conftest.vals
  2947. done
  2948. rm -f conftest.vals
  2949.  
  2950. cat >> $CONFIG_STATUS <<\EOF
  2951.   rm -f conftest.frag conftest.h
  2952.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2953.   cat conftest.in >> conftest.h
  2954.   rm -f conftest.in
  2955.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2956.     echo "$ac_file is unchanged"
  2957.     rm -f conftest.h
  2958.   else
  2959.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2960.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2961.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2962.       # The file is in a subdirectory.
  2963.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2964.     fi
  2965.     rm -f $ac_file
  2966.     mv conftest.h $ac_file
  2967.   fi
  2968. fi; done
  2969.  
  2970. EOF
  2971. cat >> $CONFIG_STATUS <<EOF
  2972.  
  2973. EOF
  2974. cat >> $CONFIG_STATUS <<\EOF
  2975.  
  2976. exit 0
  2977. EOF
  2978. chmod +x $CONFIG_STATUS
  2979. rm -fr confdefs* $ac_clean_files
  2980. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2981.  
  2982.  
  2983.  
  2984. PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
  2985. \$(OBJDIR)/chkslang.o : \$(SRCDIR)/chkslang.c \$(DOT_O_DEPS) \$("chkslang"_O_DEP)
  2986.     cd \$(OBJDIR); \$(COMPILE_CMD) \$(SRCDIR)/chkslang.c
  2987. "
  2988.  
  2989.  
  2990.  
  2991. PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
  2992. \$(OBJDIR)/sltcp.o : \$(SRCDIR)/sltcp.c \$(DOT_O_DEPS) \$("sltcp"_O_DEP)
  2993.     cd \$(OBJDIR); \$(COMPILE_CMD) \$(SRCDIR)/sltcp.c
  2994. "
  2995.  
  2996.  
  2997. PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
  2998. \$(OBJDIR)/nntplib.o : \$(SRCDIR)/nntplib.c \$(DOT_O_DEPS) \$("nntplib"_O_DEP)
  2999.     cd \$(OBJDIR); \$(COMPILE_CMD) \$(SRCDIR)/nntplib.c
  3000. "
  3001.  
  3002.   
  3003. PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
  3004. slrnpull : \$(OBJDIR)/slrnpull
  3005.     @echo slrnpull created in \$(OBJDIR)
  3006. \$(OBJDIR)/slrnpull : \$(OBJDIR)/slrnpull.o \$("slrnpull"_DEPS) \$(EXECDEPS)
  3007.     \$(CC) -o \$(OBJDIR)/slrnpull \$(LDFLAGS) \$(OBJDIR)/slrnpull.o \$("slrnpull"_LIBS) \$(EXECLIBS)
  3008. \$(OBJDIR)/slrnpull.o : \$(SRCDIR)/slrnpull.c \$(DOT_O_DEPS) \$("slrnpull"_O_DEP)
  3009.     cd \$(OBJDIR); \$(COMPILE_CMD) \$("slrnpull"_INC) \$(EXECINC) \$(SRCDIR)/slrnpull.c
  3010. "
  3011.  
  3012.  
  3013.  
  3014.  echo "$PROGRAM_OBJECT_RULES" >> src/Makefile
  3015.  
  3016.  
  3017. if test "$slrn_cv_domain" != no; then
  3018.   echo ""
  3019.   echo "Your DOMAIN appears to be: $slrn_cv_domain"
  3020.   echo "If this is not correct, edit src/sysconf.h!!!"
  3021. fi
  3022.  
  3023. echo ""
  3024. echo "For some INSTALLATION options,  edit src/Makefile."
  3025. echo "For INEWS, LOCAL SPOOL, GROUPLENS, SLANG, ... support, edit src/slrnfeat.h"
  3026. echo ""
  3027.  
  3028.